public GameState() { PaddleState = new PaddleState(); BallStates = new List <BallState>(); Lives = 5; HudState = new HudState { LivesCount = Lives }; BricksContainerState = new BricksContainerState(); BricksContainerState.NoMoreBricks += BricksContainerState_NoMoreBricks; }
public void BallDropped(BallState state) { BallStates.Remove(state); HudState.SetLivesChanged(--Lives); if (Lives > 0) { PaddleState.SpawnNewBall(); } else { GameManager.Instance.Defeat(); } }