コード例 #1
0
void ETHScriptWrapper::LoadSceneScripts()
{
	const int onSceneLoadedFuncId = GetFunctionId(m_pASModule, m_nextScene.GetOnSceneLoadedFunc());
	if (onSceneLoadedFuncId >= 0)
	{
		ETHGlobal::ExecuteContext(m_pScriptContext, onSceneLoadedFuncId);
	}

	m_onSceneUpdateFunctionId = GetFunctionId(m_pASModule, m_nextScene.GetOnSceneUpdateFunc());
	m_onResumeFunctionId = GetFunctionId(m_pASModule, m_nextScene.GetOnResumeFunc());
}
コード例 #2
0
ファイル: CobInstance.cpp プロジェクト: FriedRice/spring
int CCobInstance::Call(const std::string& fname, std::vector<int>& args, CBCobThreadFinish cb, void* p1, void* p2)
{
	int fn = GetFunctionId(fname);
	//TODO: Check that new behaviour of actually calling cb when the function is not defined is right?
	//      (the callback has always been called [when the function is not defined]
	//       in the id-based Call()s, but never in the string based calls.)
	return RealCall(fn, args, cb, p1, p2);
}