lua/wrappers/game/lua_character.cpp
/**
	 * Sets the characters destination in world units (not by grid coordinates).
	 *
	 * @param number x The x world unit.
	 * @param number y The y world unit.
	 * @returns am.character This
	 */
Sets the characters destination in world units (not by grid coordinates).
@param number x The x world unit.
@param number y The y world unit.
Sets the characters destination in world units ( not by grid coordinates ) . @param number x The x world unit . @param number y The y world unit .
int Character_destination(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			if (lua_gettop(lua) == 1)
			{
				math::Vector2f dest = obj->getDestination();
				lua_pushnumber(lua, dest.x);
				lua_pushnumber(lua, dest.y);
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				obj->setDestination(lua_tonumber(lua, 2), lua_tonumber(lua, 3));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "destination", "number x, number y");
		}
		return LuaState::expectedContext(lua, "destination", "am.character");
	}
int Character_destination ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { if ( lua_gettop ( lua ) == 1 ) { math :: Vector2f dest = obj -> getDestination ( ) ; lua_pushnumber ( lua , dest . x ) ; lua_pushnumber ( lua , dest . y ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { obj -> setDestination ( lua_tonumber ( lua , 2 ) , lua_tonumber ( lua , 3 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the characters destination in world units (not by grid coordinates).
Sets the characters destination in world units ( not by grid coordinates ) .