Ejemplo n.º 1
0
        public Integer2?GetTilePositon(GameTile tile)
        {
            int width  = tiles.GetLength(0);
            int height = tiles.GetLength(1);

            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    var otherTile = tiles[x, y];

                    if (otherTile == tile)
                    {
                        return(new Integer2(x, y));
                    }
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
 public Building(BuildingTemplate template, GameTile tile)
 {
     Template = template;
     Tile     = tile;
 }