lua/wrappers/game/lua_game_object.cpp
/**
	 * Sets the GameObjects map location.
	 * @param number x The x map value
	 * @param number y The y map value
	 * @returns am.GameObject This
	 */
Sets the GameObjects map location.
@param number x The x map value
@param number y The y map value
@returns am.GameObject This
Sets the GameObjects map location . @param number x The x map value @param number y The y map value @returns am . GameObject This
int GameObject_location(lua_State *lua, GameObject *obj)
	{
		if (!obj)
		{
			return 0;
		}
		if (lua_gettop(lua) == 1)
		{
			lua_pushnumber(lua, obj->getLocationX());
			lua_pushnumber(lua, obj->getLocationY());
			return 2;
		}
		else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
		{
			obj->setLocation(lua_tofloat(lua, 2), lua_tofloat(lua, 3));
			lua_first(lua);
		}
		return LuaState::expectedArgs(lua, "location", "number x, number y");
	}
int GameObject_location ( lua_State * lua , GameObject * obj ) { if ( ! obj ) { return 0 ; } if ( lua_gettop ( lua ) == 1 ) { lua_pushnumber ( lua , obj -> getLocationX ( ) ) ; lua_pushnumber ( lua , obj -> getLocationY ( ) ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { obj -> setLocation ( lua_tofloat ( lua , 2 ) , lua_tofloat ( lua , 3 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; }
Sets the GameObjects map location.
Sets the GameObjects map location .