lua/wrappers/game/lua_tile.cpp
/**
	 * Returns a table that contains all the transitional assets that will be used.
	 * Each key value is the name of the tile and each value is a table array that contains all the assets.
	 * The key for the default list is "_default_".
	 *
	 * @returns table A table that defines all the transitional assets.
	 */
Returns a table that contains all the transitional assets that will be used.
Each key value is the name of the tile and each value is a table array that contains all the assets.
The key for the default list is "_default_".

@returns table A table that defines all the transitional assets.
Returns a table that contains all the transitional assets that will be used . Each key value is the name of the tile and each value is a table array that contains all the assets . The key for the default list is " _default_ " . @returns table A table that defines all the transitional assets .
int Tile_all_transitional(lua_State *lua)
	{
		Tile *tile = castUData<Tile>(lua, 1);
		if (tile)
		{
			const Tile::TileAssetMap &tiles = tile->getAllTransitionalAssets();
			lua_createtable(lua, 0, tiles.size());
			for (auto iter = tiles.begin(); iter != tiles.end(); ++iter)
			{
				if (iter->first == nullptr)
				{
					lua_pushstring(lua, "_default_");
				}
				else
				{
					lua_pushstring(lua, iter->first->getName().c_str());
				}
				const Tile::TileAssetList &list = iter->second;
				lua_createtable(lua, list.size(), 0);
				int i = 1;
				for (auto iterList = list.begin(); iterList != list.end(); ++iterList)
				{
					lua_pushinteger(lua, i++);
					wrapRefObject<Asset>(lua, iterList->get());
					lua_settable(lua, -3);
				}
				lua_settable(lua, -3);
			}
			return 1;
		}
		return LuaState::expectedContext(lua, "all_transitional", "am.tile");
	}
int Tile_all_transitional ( lua_State * lua ) { Tile * tile = castUData < Tile > ( lua , 1 ) ; if ( tile ) { const Tile :: TileAssetMap & tiles = tile -> getAllTransitionalAssets ( ) ; lua_createtable ( lua , 0 , tiles . size ( ) ) ; for ( auto iter = tiles . begin ( ) ; iter != tiles . end ( ) ; ++ iter ) { if ( iter -> first == nullptr ) { lua_pushstring ( lua , " " ) ; } else { lua_pushstring ( lua , iter -> first -> getName ( ) . c_str ( ) ) ; } const Tile :: TileAssetList & list = iter -> second ; lua_createtable ( lua , list . size ( ) , 0 ) ; int i = 1 ; for ( auto iterList = list . begin ( ) ; iterList != list . end ( ) ; ++ iterList ) { lua_pushinteger ( lua , i ++ ) ; wrapRefObject < Asset > ( lua , iterList -> get ( ) ) ; lua_settable ( lua , -3 ) ; } lua_settable ( lua , -3 ) ; } return 1 ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns a table that contains all the transitional assets that will be used.
Returns a table that contains all the transitional assets that will be used .