示例#1
0
int32_t NpcScriptInterface::luaActionMove(lua_State* L)
{
	//selfMove(direction)
	Npc* npc = getScriptEnv()->getNpc();
	if (npc) {
		npc->doMove(static_cast<Direction>(getNumber<uint32_t>(L, 1)));
	}
	return 0;
}
示例#2
0
int32_t NpcScriptInterface::luaActionMove(lua_State* L)
{
	//selfMove(direction)
	Direction dir = (Direction)popNumber(L);

	Npc* npc = getScriptEnv()->getNpc();
	if (npc) {
		npc->doMove(dir);
	}

	return 0;
}