Exemplo n.º 1
0
int NFCActorManager::RequireActor()
{
	//¶Ñactor
	NF_SHARE_PTR<NFIActor> pActor(NF_NEW NFCActor(*m_pFramework, this));
	mxActorMap.insert(std::make_pair(pActor->GetAddress().AsInteger(), pActor));

	return pActor->GetAddress().AsInteger();
}
Exemplo n.º 2
0
bool NFCActorManager::Init()
{
	m_pMainActor = NF_SHARE_PTR<NFIActor>(NF_NEW NFCActor(*m_pFramework, this));

	pPluginManager->Init();

	return true;
}
Exemplo n.º 3
0
int NFCActorModule::RequireActor()
{
    
    NF_SHARE_PTR<NFIActor> pActor(NF_NEW NFCActor(*m_pFramework, this));
	mxActorMap.AddElement(pActor->GetAddress().AsInteger(), pActor);

    return pActor->GetAddress().AsInteger();
}
Exemplo n.º 4
0
NFCActorModule::NFCActorModule(NFIPluginManager* p)
{
	pPluginManager = p;

    srand((unsigned)time(NULL));

    m_pFramework = NF_NEW Theron::Framework(NF_ACTOR_THREAD_COUNT);

    m_pMainActor = NF_SHARE_PTR<NFIActor>(NF_NEW NFCActor(*m_pFramework, this));
}
Exemplo n.º 5
0
int NFCActorManager::OnRequireActor(NFIComponent* pComponent)
{
	//¶Ñactor
	if (pComponent)
	{
		NF_SHARE_PTR<NFIActor> pActor(NF_NEW NFCActor(*m_pFramework, this));

		pActor->RegisterActorComponent(pComponent);

		mxActorMap.insert(std::make_pair(pActor->GetAddress().AsInteger(), pActor));

		return pActor->GetAddress().AsInteger();
	}
	
	return 0;
}