class flixel.addons.editors.ogmo.FlxOgmoLoader
Available on all platforms
Instance Fields
function new(LevelData:Dynamic):Void
Creates a new instance of OgmoLevelLoader and prepares the XML level data to be loaded. * This object can either be contained or ovewritten. * * IMPORTANT: -> Tile layers must have the Export Mode set to "CSV". * -> First tile in spritesheet must be blank or debug. It will never get drawn so don't place them in Ogmo! * (This is needed to support many other editors that use index 0 as empty.) * *
LevelData | A String or Class representing the location of xml level data. |
function loadEntities(EntityLoadCallback:String ->Xml ->Void, ?EntityLayer:String = 'entities'):Void
EntityLoadCallback | A function that takes in the following parameters (name:String, data:Xml):Void (returns Void) that spawns entities based on their name. * |
EntityLayer | The name of the layer the entities are stored in Ogmo editor. Usually "entities" or "actors" |
function loadRectangles(RectLoadCallback:FlxRect ->Void, ?RectLayer:String = 'rectangles'):Void
Parse every 'rect' in the specified layer and call a function to do something based on each rectangle. * Useful for setting up zones or regions in your game that can be filled in procedurally. * *
RectLoadCallback | A function that takes in the Rectangle object and returns Void. * |
RectLayer | The name of the layer which contains 'rect' objects. |
function loadTilemap(TileGraphic:Dynamic, ?TileWidth:Int = 16, ?TileHeight:Int = 16, ?TileLayer:String = 'tiles'):FlxTilemap
TileGraphic | A String or Class representing the location of the image asset for the tilemap. * |
TileWidth | The width of each individual tile. * |
TileHeight | The height of each individual tile. * |
TileLayer | The name of the layer the tilemap data is stored in Ogmo editor, usually "tiles" or "stage". * |
returns | A FlxTilemap, where you can collide your entities against. |