Method | Description | |
---|---|---|
GetObjectLayerByName ( string name ) : |
||
GetPxTile ( float px, float py, int layerIndex ) : |
||
GetPxTopMostTile ( Vector2 pos ) : |
||
GetPxTopMostTile ( float px, float py ) : |
||
GetTileBounds ( Vector2 txPos ) : |
Returns the rectangular bounds for the tile at the specified coordinate. The coordinate passed should in tile coordinates (TX) rather than map pixel coordinates (PX).
|
|
GetTileLayerByName ( string name ) : |
||
GetTxTile ( int tx, int ty, int layerIndex ) : |
||
GetTxTopMostTile ( int tx, int ty ) : |
Retrieves the Topmost tile at the specified (X,Y) location on the map. By top most, the function refers to the draw order, i.e. the tile which would be shown on top. The first non-zero tile found from the top will be returned by this function. Tiles found in Tile layers marked as "Foreground" are not included. If no non-zero tile is found in any layer, then a null value is returned.
|
|
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void | ||
LoadTmxFile ( string file ) : |
||
PxToTx ( Vector2 position ) : Vector2 |
Converts the specfied global world (px) coordinates into its relevant tile coordinate.
|
|
TiledMap ( ) : System | ||
ToString ( ) : string | ||
TxToPx ( Vector2 position, bool center = true ) : Vector2 |
Converts the specified tile (tx) coordinates into global world (px) coordinates. The result returned will be situated at the very center for the specified tile coordinate if the center parameter is specified as true.
|
Method | Description | |
---|---|---|
ConvertToPointsList ( string pointData ) : List |
public GetObjectLayerByName ( string name ) : |
||
name | string | |
return |
public GetPxTile ( float px, float py, int layerIndex ) : |
||
px | float | |
py | float | |
layerIndex | int | |
return |
public GetPxTopMostTile ( Vector2 pos ) : |
||
pos | Vector2 | |
return |
public GetPxTopMostTile ( float px, float py ) : |
||
px | float | |
py | float | |
return |
public GetTileBounds ( Vector2 txPos ) : |
||
txPos | Vector2 | |
return |
public GetTileLayerByName ( string name ) : |
||
name | string | |
return |
public GetTxTile ( int tx, int ty, int layerIndex ) : |
||
tx | int | |
ty | int | |
layerIndex | int | |
return |
public GetTxTopMostTile ( int tx, int ty ) : |
||
tx | int | integer X value. |
ty | int | integer Y value. |
return |
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void | ||
content | Microsoft.Xna.Framework.Content.ContentManager | |
return | void |
public static LoadTmxFile ( string file ) : |
||
file | string | |
return |
public TxToPx ( Vector2 position, bool center = true ) : Vector2 | ||
position | Vector2 | |
center | bool | |
return | Vector2 |