Пример #1
0
        // get position on the map based on a specfic tile index
        public Point GetPositionByTileIndex(int xIndex, int yIndex)
        {
            MapTile tile = GetMapTile(xIndex, yIndex);

            return(new Point(tile.GetX(), tile.GetY()));
        }
Пример #2
0
 // set specific map tile from tile map to a new map tile
 public void SetMapTile(int x, int y, MapTile tile)
 {
     mapTiles[GetConvertedIndex(x, y)] = tile;
 }
Пример #3
0
        // gets player start position based on player start tile (basically the start tile's position on the map)
        public Point GetPlayerStartPosition()
        {
            MapTile tile = GetMapTile(playerStartTile.X.Round(), playerStartTile.Y.Round());

            return(new Point(tile.GetX(), tile.GetY()));
        }