Ejemplo n.º 1
0
 public void ResetGame()
 {
     ScoreController.ResetScore();
     LevelController.Reset();
     LivesController.ResetLives();
     ResetPaddlePosition();
     ClearBricks();
     GenerateCurrentLevel();
 }
Ejemplo n.º 2
0
        private void Awake()
        {
            _playerInputController = GetComponent <PlayerInputController>();

            var brickFactoryGameObject = Instantiate(_brickFactoryPrefab);

            brickFactoryGameObject.name = _brickFactoryPrefab.name;
            _brickFactory = brickFactoryGameObject.GetComponent <BrickFactory>();

            var ballFactoryGameObject = Instantiate(_ballFactoryPrefab);

            ballFactoryGameObject.name = _ballFactoryPrefab.name;
            _ballFactory = ballFactoryGameObject.GetComponent <BallFactory>();

            _bricksController                 = new BricksController();
            _bricksController.BrickHit       += OnBrickHit;
            _bricksController.BrickDestroyed += OnBrickDestroy;
            _livesController = new LivesController();
            _scoreController = new ScoreController();
            _levelController = new LevelController();

            _stateMachine = new BreakoutGameStateMachine();
        }
Ejemplo n.º 3
0
 public void ResetLives()
 {
     LivesController.ResetLives();
 }
Ejemplo n.º 4
0
 public void RemoveLife()
 {
     LivesController.RemoveLife();
 }