C# Class World.ToyWorldCore.MapLoader

Show file Open project: GoodAI/BrainSimulator Class Usage Examples

Public Methods

Method Description
LoadMap ( Map map, TilesetTable tilesetTable, Action initializer ) : IAtlas

Loads map from specified path, creates tiles and objects and put them into new Atlas object.

Private Methods

Method Description
CreateInstance ( string className, int tileNumber, Type types, Vector2I position ) : Tile
FillNamedAreas ( IAtlas atlas, Map map ) : void
FillObjectLayer ( IAtlas atlas, ObjectGroup objectLayer, LayerType layerType, Action initializer, List tilesets, int tileWidth, int tileHeight, int worldHeight ) : IObjectLayer
FillTileLayer ( Layer layer, LayerType layerType, StaticTile>.Dictionary staticTilesContainer, TilesetTable tilesetTable, Action initializer, Random random ) : ITileLayer
LoadAgent ( TmxObject avatar, List tilesets ) : Avatar
LoadCharacter ( TmxObject tmxObject, List tilesets ) : Character
NormalizeObjectPosition ( TmxObject tmxObject, int tileWidth, int tileHeight, int worldHeight ) : void

From absolute position in pixels to side of tile = 1

PolylineTransform ( Map map, TmxObject polyline ) : IEnumerable
RotateAroundCenter ( System.Vector2 target, System.Vector2 center, float angle ) : System.Vector2
SetGameObjectProperties ( List properties, GameObject gameObject ) : void
SetTileRelations ( IAtlas atlas, Map map ) : void
TilesetNameFromGid ( List tilesets, int gid ) : int>.Tuple
TransformObjectPosition ( TmxObject tmxObject ) : void

Transforms from rotation around left lower corner to rotation around center

Method Details

LoadMap() public static method

Loads map from specified path, creates tiles and objects and put them into new Atlas object.
public static LoadMap ( Map map, TilesetTable tilesetTable, Action initializer ) : IAtlas
map TmxMapSerializer.Elements.Map Deserialized .tmx file
tilesetTable World.GameActors.Tiles.TilesetTable Table of numbers of game object and theirs classes
initializer Action
return IAtlas