Class used for importing OgmoProject files quickly, and loading levels created in Ogmo Editor (http://ogmoeditor.com) Currently OgmoProjects must export in XML Co-ords for Tiles and Entities, and Bitstring for Grids.
More...
|
| OgmoProject (string source, string imagePath="") |
| Create an OgmoProject from a source .oep file. More...
|
|
void | RemapAsset (string searchPath, string replacement) |
| Assign a replacement asset for a Tilemap when LoadLevel is called. More...
|
|
T | GetValue< T > (string name, string data="") |
| Get a value from an Ogmo level. More...
|
|
T | GetValue< T > (Enum name, string source="") |
| Get a value from an Ogmo level. More...
|
|
T | GetValueFromFile< T > (string name, string path) |
|
string | GetLayerData (string name, string data="") |
|
void | LoadLevel (string data, Scene scene) |
| Load level data from a string into a Scene. More...
|
|
void | LoadLevelFromFile (string path, Scene scene) |
| Load data into a Scene from a source .oel file. More...
|
|
void | RegisterTag (int tag, string layerName) |
| Register a collision tag on a grid layer loaded from the oel file. More...
|
|
void | RegisterTag (Enum tag, string layerName) |
| Register a collision tag on a grid layer loaded from the oel file. More...
|
|
Entity | GetEntityFromLayerName (string layerName) |
| Get the Entity that was created for a specific Ogmo layer. More...
|
|
List< string > | GetLayerNames () |
| Get a list of all the known layer names from the .oep file. More...
|
|
|
bool | DisplayGrids = true |
| Determines if grid layers will render in the game. Only applies at loading time. More...
|
|
string | ImagePath |
| The default image path to search for tilemaps in. More...
|
|
bool | UseCameraBounds = true |
| Determines if loaded levels will use camera bounds in the Scene. More...
|
|
bool | UseAtlas |
| Determines if tilemaps are located in an Atlas. More...
|
|
Color | BackgroundColor |
| The default background color of the Ogmo Project. More...
|
|
Color | GridColor |
| The default background grid color of the Ogmo Project. More...
|
|
Dictionary< string, OgmoLayer > | Layers = new Dictionary<string, OgmoLayer>() |
| The known layers loaded from the Ogmo Editor oep file. More...
|
|
Dictionary< string, string > | TileMaps = new Dictionary<string, string>() |
| Mapping the tile layers to file paths. More...
|
|
Dictionary< string, Entity > | Entities = new Dictionary<string, Entity>() |
| The entities stored to create tilemaps and grids. Cleared every time LoadLevel is called. More...
|
|
string | CreationMethodName = "CreateFromXml" |
| The name of the method to use for creating Entities when loading an .oel file into a Scene. More...
|
|
int | BaseTileDepth |
| The drawing layer to place the first loaded tile map on. More...
|
|
int | TileDepthIncrement = 100 |
| Determines the drawing layers for each subsequently loaded tile map. For example, the first tilemap will be at Layer 0, the second at Layer 100, the third at Layer 200, etc. More...
|
|
Class used for importing OgmoProject files quickly, and loading levels created in Ogmo Editor (http://ogmoeditor.com) Currently OgmoProjects must export in XML Co-ords for Tiles and Entities, and Bitstring for Grids.
Otter.OgmoProject.OgmoProject |
( |
string |
source, |
|
|
string |
imagePath = "" |
|
) |
| |
Create an OgmoProject from a source .oep file.
- Parameters
-
source | The path to the .oep file. |
imagePath | The default image path to use for loading tilemaps. |
Entity Otter.OgmoProject.GetEntityFromLayerName |
( |
string |
layerName | ) |
|
Get the Entity that was created for a specific Ogmo layer.
- Parameters
-
layerName | The name of the layer to find. |
- Returns
- The Entity created for that layer.
List<string> Otter.OgmoProject.GetLayerNames |
( |
| ) |
|
Get a list of all the known layer names from the .oep file.
- Returns
T Otter.OgmoProject.GetValue< T > |
( |
string |
name, |
|
|
string |
data = "" |
|
) |
| |
Get a value from an Ogmo level.
- Template Parameters
-
- Parameters
-
name | The name of the value. |
data | The level data to use. If left blank will use the CurrentLevel. |
- Returns
- The value cast to type T.
T Otter.OgmoProject.GetValue< T > |
( |
Enum |
name, |
|
|
string |
source = "" |
|
) |
| |
Get a value from an Ogmo level.
- Template Parameters
-
- Parameters
-
name | The name of the value. |
source | The level data to use. If left blank will use the CurrentLevel. |
- Returns
- The value cast to type T.
void Otter.OgmoProject.LoadLevel |
( |
string |
data, |
|
|
Scene |
scene |
|
) |
| |
Load level data from a string into a Scene.
- Parameters
-
data | The level data to load. |
scene | The Scene to load into. |
void Otter.OgmoProject.LoadLevelFromFile |
( |
string |
path, |
|
|
Scene |
scene |
|
) |
| |
Load data into a Scene from a source .oel file.
- Parameters
-
path | The oel to load. |
scene | The Scene to load into. |
void Otter.OgmoProject.RegisterTag |
( |
int |
tag, |
|
|
string |
layerName |
|
) |
| |
Register a collision tag on a grid layer loaded from the oel file.
- Parameters
-
tag | The tag to use. |
layerName | The layer name that should use the tag. |
void Otter.OgmoProject.RegisterTag |
( |
Enum |
tag, |
|
|
string |
layerName |
|
) |
| |
Register a collision tag on a grid layer loaded from the oel file.
- Parameters
-
tag | The enum tag to use. (Casts to int!) |
layerName | The layer name that should use the tag. |
void Otter.OgmoProject.RemapAsset |
( |
string |
searchPath, |
|
|
string |
replacement |
|
) |
| |
Assign a replacement asset for a Tilemap when LoadLevel is called.
- Parameters
-
searchPath | The asset path to find (searches at the end of the string!) |
replacement | The full path to replace the matching asset with. |
Color Otter.OgmoProject.BackgroundColor |
The default background color of the Ogmo Project.
int Otter.OgmoProject.BaseTileDepth |
The drawing layer to place the first loaded tile map on.
string Otter.OgmoProject.CreationMethodName = "CreateFromXml" |
The name of the method to use for creating Entities when loading an .oel file into a Scene.
bool Otter.OgmoProject.DisplayGrids = true |
Determines if grid layers will render in the game. Only applies at loading time.
Dictionary<string, Entity> Otter.OgmoProject.Entities = new Dictionary<string, Entity>() |
The entities stored to create tilemaps and grids. Cleared every time LoadLevel is called.
Color Otter.OgmoProject.GridColor |
The default background grid color of the Ogmo Project.
string Otter.OgmoProject.ImagePath |
The default image path to search for tilemaps in.
Dictionary<string, OgmoLayer> Otter.OgmoProject.Layers = new Dictionary<string, OgmoLayer>() |
The known layers loaded from the Ogmo Editor oep file.
int Otter.OgmoProject.TileDepthIncrement = 100 |
Determines the drawing layers for each subsequently loaded tile map. For example, the first tilemap will be at Layer 0, the second at Layer 100, the third at Layer 200, etc.
Dictionary<string, string> Otter.OgmoProject.TileMaps = new Dictionary<string, string>() |
Mapping the tile layers to file paths.
bool Otter.OgmoProject.UseAtlas |
Determines if tilemaps are located in an Atlas.
bool Otter.OgmoProject.UseCameraBounds = true |
Determines if loaded levels will use camera bounds in the Scene.
string Otter.OgmoProject.CurrentLevel |
|
getset |
The documentation for this class was generated from the following file:
- Otter/Utility/OgmoProject.cs