lua/wrappers/game/lua_map_region.cpp
/**
	 * Sets the x and y location of the map region.
	 *
	 * @param integer x The x location.
	 * @param integer y The y location.
	 * @returns am.map_region This.
	 */
Sets the x and y location of the map region.
@param integer x The x location.
@param integer y The y location.
Sets the x and y location of the map region . @param integer x The x location . @param integer y The y location .
int MapRegion_location(lua_State *lua)
	{
		MapRegion *region = castUData<MapRegion>(lua, 1);
		if (region)
		{
			int args = lua_gettop(lua);
			if (args == 1)
			{
				math::Vector2i location = region->getLocation();
				lua_pushinteger(lua, location.x);
				lua_pushinteger(lua, location.y);
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				region->setLocation(lua_tointeger(lua, 2), lua_tointeger(lua, 3));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "location", "integer x, integer y");
		}
		return LuaState::expectedContext(lua, "location", "am.map_region");
	}
int MapRegion_location ( lua_State * lua ) { MapRegion * region = castUData < MapRegion > ( lua , 1 ) ; if ( region ) { int args = lua_gettop ( lua ) ; if ( args == 1 ) { math :: Vector2i location = region -> getLocation ( ) ; lua_pushinteger ( lua , location . x ) ; lua_pushinteger ( lua , location . y ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { region -> setLocation ( lua_tointeger ( lua , 2 ) , lua_tointeger ( lua , 3 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the x and y location of the map region.
Sets the x and y location of the map region .