コード例 #1
0
 /// <summary>
 /// Find world position of tile assuming it belongs to passed tile layer.
 /// </summary>
 /// <param name="tileLayer">Tile layer which owns this tile.</param>
 /// <returns>World position of tile.</returns>
 public Vector2 GetWorldPosition(T2DTileLayer tileLayer)
 {
     return GetWorldPosition(tileLayer.Position, tileLayer.Rotation, tileLayer.MapSize, tileLayer.TileSize);
 }
コード例 #2
0
 /// <summary>
 /// Find position of tile in local tile layer space (center of tile map is origin).
 /// </summary>
 /// <param name="tileLayer">Tile layer which owns this tile.</param>
 /// <returns>Position of tile.</returns>
 public Vector2 GetTileLocalPosition(T2DTileLayer tileLayer)
 {
     return GetTileLocalPosition(tileLayer.MapSize, tileLayer.TileSize);
 }