コード例 #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);
        }
コード例 #2
0
ファイル: LevelFog.cs プロジェクト: Vacui/Tunnel
 private void DiscoverTile(int x, int y)
 {
     grid.SetTile(x, y, TileVisibility.Visible);
 }