コード例 #1
0
ファイル: Game.cs プロジェクト: cyecp/DeltaEngine.OpenTK
 public void RestartGame()
 {
     yesCommand.Dispose();
     noCommand.Dispose();
     gameOverMsg.Dispose();
     restartMsg.Dispose();
     InitializeSnake();
     SpawnFirstChunk();
 }
コード例 #2
0
 private void BackToMainMenu()
 {
     controls.Dispose();
     Dispose();
     if (gameOverMessage != null)
     {
         gameOverMessage.Dispose();
     }
     if (backToMenuCommand != null)
     {
         backToMenuCommand.Dispose();
     }
     mainMenu.Show();
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: cyecp/DeltaEngine.OpenTK
 private void BackToMainMenu()
 {
     if (gameOverMessage != null)
     {
         gameOverMessage.Dispose();
     }
     if (backToMenuCommand != null)
     {
         backToMenuCommand.Dispose();
     }
     if (restartCommand != null)
     {
         restartCommand.Dispose();
     }
     Hide();
     menu.Show();
 }
コード例 #4
0
 private void ExitGame()
 {
     for (int x = 0; x < logic.Board.Width; x++)
     {
         for (int y = 0; y < logic.Board.Height; y++)
         {
             if (buttons[x, y] != null)
             {
                 buttons[x, y].Dispose();
             }
         }
     }
     upperText.Dispose();
     lowerText.Dispose();
     if (Exited != null)
     {
         Exited();
     }
 }
コード例 #5
0
 /// <summary>
 /// Disposes style class.
 /// </summary>
 public void Dispose()
 {
     FontMarks.Dispose();
     FontText.Dispose();
 }