Exemple #1
0
 public HintControler(HintView hintView, CheckChangedBallController changedBallController, MonoBehaviour monoBehaviour)
 {
     _hintView = hintView;
     _changedBallController              = changedBallController;
     _monoBehaviour                      = monoBehaviour;
     _changedBallController.SuccessBall += OnSuccessBall;
 }
Exemple #2
0
        public GamePoleController(HintView hintView, GamePoleView gamePole, BallPool ballPool, BallSpritesViewDescription spritesViewDescription, MiningSceneViewDescription miningViewDescription, MonoBehaviour monoBehaviour)
        {
            _balls = new BallController[gamePole.CountHorCell, gamePole.CountVertCell];
            var checkBall                  = new CheckBall(new BallPoint(gamePole.CountHorCell, gamePole.CountVertCell));
            var movedController            = new MovedController(_balls, gamePole, checkBall);
            var destroyControler           = new DestroyControllerBall(_balls, movedController, ballPool);
            var checkChangedBallController = new CheckChangedBallController(_balls, checkBall);
            var fallBallContorller         = new FallControllerBall(_balls, movedController);
            var generateBalls              = new GenerateBalls(new BallPoint(gamePole.CountHorCell, gamePole.CountVertCell), miningViewDescription, ballPool);
            var newGenerateController      = new NewGenerateController(generateBalls, gamePole, _balls, spritesViewDescription, movedController);
            var hintController             = new HintControler(hintView, checkChangedBallController, monoBehaviour);

            _gamePoleStateControler           = new GamePoleStateControler(destroyControler, fallBallContorller, movedController, newGenerateController, checkChangedBallController, _balls, hintController);
            _gamePoleStateControler.GameOver += CallGameOver;

            gamePole.Activate();
            _gamePoleStateControler.StartGame();
        }