C# 클래스 GameEngine.Tiled.TiledMap

상속: PropertyBag, ILoadable
파일 보기 프로젝트 열기: MichaelAquilina/Some-2D-RPG 1 사용 예제들

공개 메소드들

메소드 설명
GetObjectLayerByName ( string name ) : TiledObjectLayer
GetPxTile ( float px, float py, int layerIndex ) : Tile
GetPxTopMostTile ( Vector2 pos ) : Tile
GetPxTopMostTile ( float px, float py ) : Tile
GetTileBounds ( Vector2 txPos ) : Rectangle

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 ) : TileLayer
GetTxTile ( int tx, int ty, int layerIndex ) : Tile
GetTxTopMostTile ( int tx, int ty ) : Tile

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 ) : TiledMap
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.

비공개 메소드들

메소드 설명
ConvertToPointsList ( string pointData ) : List

메소드 상세

GetObjectLayerByName() 공개 메소드

public GetObjectLayerByName ( string name ) : TiledObjectLayer
name string
리턴 TiledObjectLayer

GetPxTile() 공개 메소드

public GetPxTile ( float px, float py, int layerIndex ) : Tile
px float
py float
layerIndex int
리턴 Tile

GetPxTopMostTile() 공개 메소드

public GetPxTopMostTile ( Vector2 pos ) : Tile
pos Vector2
리턴 Tile

GetPxTopMostTile() 공개 메소드

public GetPxTopMostTile ( float px, float py ) : Tile
px float
py float
리턴 Tile

GetTileBounds() 공개 메소드

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).
public GetTileBounds ( Vector2 txPos ) : Rectangle
txPos Vector2
리턴 Microsoft.Xna.Framework.Rectangle

GetTileLayerByName() 공개 메소드

public GetTileLayerByName ( string name ) : TileLayer
name string
리턴 TileLayer

GetTxTile() 공개 메소드

public GetTxTile ( int tx, int ty, int layerIndex ) : Tile
tx int
ty int
layerIndex int
리턴 Tile

GetTxTopMostTile() 공개 메소드

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.
public GetTxTopMostTile ( int tx, int ty ) : Tile
tx int integer X value.
ty int integer Y value.
리턴 Tile

LoadContent() 공개 메소드

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
리턴 void

LoadTmxFile() 공개 정적인 메소드

public static LoadTmxFile ( string file ) : TiledMap
file string
리턴 TiledMap

PxToTx() 공개 메소드

Converts the specfied global world (px) coordinates into its relevant tile coordinate.
public PxToTx ( Vector2 position ) : Vector2
position Vector2
리턴 Vector2

TiledMap() 공개 메소드

public TiledMap ( ) : System
리턴 System

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

TxToPx() 공개 메소드

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.
public TxToPx ( Vector2 position, bool center = true ) : Vector2
position Vector2
center bool
리턴 Vector2