// Reset method which is called after a new game is started public void Reset() { // clear the grid and put the blocksplaced and score to 0 grid.Clear(); blocksplaced = 0; Score.currentscore = 0; }
//check if death row contains values other than zero, ifso Game over public void CheckIfGameOver() { for (int i = 1; i < TetrisGrid.GridWidth + 1; i++) { if (TetrisGrid.Grid[i, 0] != 0) { //TetrisGame.GameState.Playing = TetrisGame.GameState.GameOver; state = true; grid.Clear(); } } }
public void Stop() { grid.Clear(); well.RemoveAllBlocks(); preview.RemoveAllBlocks(); tickDuration = _tickDuration; tickElapsed = score = linesRemoved = level = 0; scoreText.value = score.ToString().PadLeft(7, '0'); backgroundMusicInstance.Stop(); }
private void GameStart() { grid.Clear(); TetrisGame.gameWorld.activeBlock = null; TetrisGame.gameWorld.queuedBlock = null; NewBlock(); activeBlock = queuedBlock; NewBlock(); score = 0; level = 1; ResetBlockTimer(); gameState = GameState.Playing; }
// Zet de game terug naar de begin staat. public void Reset() { gameState = GameState.Init; grid.Clear(); score = 0; rowsToGo = 20; level = 1; if (gameType == GameType.Normal) { dropSpeed = 1000; } else { dropSpeed = 600; } }
public void Reset() { grid.Clear(); }