public void RestartGame() { yesCommand.Dispose(); noCommand.Dispose(); gameOverMsg.Dispose(); restartMsg.Dispose(); InitializeSnake(); SpawnFirstChunk(); }
private void BackToMainMenu() { controls.Dispose(); Dispose(); if (gameOverMessage != null) { gameOverMessage.Dispose(); } if (backToMenuCommand != null) { backToMenuCommand.Dispose(); } mainMenu.Show(); }
private void BackToMainMenu() { if (gameOverMessage != null) { gameOverMessage.Dispose(); } if (backToMenuCommand != null) { backToMenuCommand.Dispose(); } if (restartCommand != null) { restartCommand.Dispose(); } Hide(); menu.Show(); }
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(); } }
/// <summary> /// Disposes style class. /// </summary> public void Dispose() { FontMarks.Dispose(); FontText.Dispose(); }