Game Development Reference
In-Depth Information
void AgentUtilities::Initialize(Agent* const agent)
{
// Retrieves the lua virtual machine the agent script is
// running on. lua_State* luaVM = agent->GetLuaVM();
lua_getglobal(luaVM, "Agent_Initialize");
// Agent_Initialize accepts one parameter, an Agent.
AgentUtilities::PushAgent(luaVM, agent);
// Execute the Agent_Initialize function and check for
// success.
if (lua_pcall(luaVM, 1, 0, 0) != 0)
{
assert(false);
}
}
Search WWH ::




Custom Search