Ejemplo n.º 1
0
        /// <summary>
        /// Restart the current level.
        /// </summary>
        public void Restart()
        {
            GridXY <Element> newLevel = new GridXY <Element>();

            newLevel.CreateGridXY(Grid.Width, Grid.Height, Grid.CellSize, Grid.OriginPosition, false, Element.NULL, Element.NULL);
            for (int x = 0; x < Grid.Width; x++)
            {
                for (int y = 0; y < Grid.Height; y++)
                {
                    newLevel.SetTile(x, y, Grid.GetTile(x, y));
                }
            }
            LoadLevel(newLevel);
        }
Ejemplo n.º 2
0
 private void DiscoverTile(int x, int y)
 {
     grid.SetTile(x, y, TileVisibility.Visible);
 }