Example #1
0
 //Reinicia o jogo
 void ResetGame()
 {
     score.CurrentScore = 0;
     ui.UpdateScores(score.CurrentScore, score.Highscore);
     EventManager.BroadcastEvent("BoardSize", new Hashtable {
         { "Size", board.boardSize }
     });
     groundDisplay.CreateMap(true);
     snake.ResetSnake(board.boardSize / 2);
     snake.speed = difficulty.GetDifficultyValue(score.CurrentScore);
     board.ResetSnakeBodyMatrix();
     board.UpdateSnakeBodyMatrix();
     food.PlaceFood(board.GetEmptyPosition());
 }