コード例 #1
0
        public GamePoleStateControler(DestroyControllerBall destroyControllerBall, FallControllerBall fallControllerBall, MovedController movedController, NewGenerateController newGenerateController, CheckChangedBallController checkChangedBallController, BallController[,] balls, HintControler hintControler)
        {
            _destroyControllerBall = destroyControllerBall;
            _fallControllerBall    = fallControllerBall;
            _movedController       = movedController;

            _newGenerateController      = newGenerateController;
            _checkChangedBallController = checkChangedBallController;
            _balls         = balls;
            _hintControler = hintControler;
            _movedController.EndBallMoved += OnEndBallMoved;
            newGenerateController.SetGenerator(true);
        }
コード例 #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();
        }