public void PlayAgain() { if (numberOfLifes >= 0) //Player won { brickSpawner.AddBricks(); numberOfLifes += 1; } else //Player lost { numberOfLifes = 2; ScoringManager.Instance.ResetScore(); } //Start level brickSpawner.PlaceBricks(); player.StartShoot(); UIManager.Instance.SetLife(numberOfLifes); UIManager.Instance.HideEndMenu(); }
static void SpawnBricks(MenuCommand command) { SpawnBricks body = (SpawnBricks)command.context; body.PlaceBricks(false); }