lua/wrappers/game/lua_character.cpp
/**
	 * Sets the characters destination in grid coordinates.
	 *
	 * @param integer x The x grid coordinate.
	 * @param integer y The y grid coordinate.
	 * @returns am.character This
	 */
Sets the characters destination in grid coordinates.
@param integer x The x grid coordinate.
@param integer y The y grid coordinate.
Sets the characters destination in grid coordinates . @param integer x The x grid coordinate . @param integer y The y grid coordinate .
int Character_grid_destination(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			if (lua_gettop(lua) == 1)
			{
				math::Vector2i dest = obj->getGridDestination();
				lua_pushinteger(lua, dest.x);
				lua_pushinteger(lua, dest.y);
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				obj->setGridDestination(lua_tointeger(lua, 2), lua_tointeger(lua, 3));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "grid_destination", "integer x, integer y");
		}
		return LuaState::expectedContext(lua, "grid_destination", "am.character");
	}
int Character_grid_destination ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { if ( lua_gettop ( lua ) == 1 ) { math :: Vector2i dest = obj -> getGridDestination ( ) ; lua_pushinteger ( lua , dest . x ) ; lua_pushinteger ( lua , dest . y ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { obj -> setGridDestination ( lua_tointeger ( lua , 2 ) , lua_tointeger ( lua , 3 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the characters destination in grid coordinates.
Sets the characters destination in grid coordinates .