コード例 #1
0
ファイル: ComponentManager.cpp プロジェクト: nahumfarchi/0ad
void CComponentManager::Script_PostMessage(void* cbdata, int ent, int mtid, CScriptVal data)
{
	CComponentManager* componentManager = static_cast<CComponentManager*> (cbdata);

	CMessage* msg = componentManager->ConstructMessage(mtid, data);
	if (!msg)
		return; // error

	componentManager->PostMessage(ent, *msg);

	delete msg;
}
コード例 #2
0
void CComponentManager::Script_PostMessage(ScriptInterface::CxPrivate* pCxPrivate, int ent, int mtid, CScriptVal data)
{
	CComponentManager* componentManager = static_cast<CComponentManager*> (pCxPrivate->pCBData);

	CMessage* msg = componentManager->ConstructMessage(mtid, data);
	if (!msg)
		return; // error

	componentManager->PostMessage(ent, *msg);

	delete msg;
}