Example #1
0
 public BallExtraFeatureBuilder(
     IBallManager ballManager,
     ITailManager tailManager,
     BallBuilder ballBuilder,
     FireBallCounter fireBallCounter)
 {
     this.ballManager     = ballManager;
     this.tailManager     = tailManager;
     this.ballBuilder     = ballBuilder;
     this.fireBallCounter = fireBallCounter;
 }
Example #2
0
        public GameEngine(int number)
        {
            GameConfig.Mouses = number;

            screen = new Screen
            {
                Width  = ScreenWidth,
                Height = ScreenHeight
            };

            ManagerScope = managerScopeFactory.Create(screen);

            levelManager           = ManagerScope.Resolve <ILevelManager>();
            ballManager            = ManagerScope.Resolve <IBallManager>();
            padManager             = ManagerScope.Resolve <IPadManager>();
            tailManager            = ManagerScope.Resolve <ITailManager>();
            borderManager          = ManagerScope.Resolve <IBorderManager>();
            collisionManager       = ManagerScope.Resolve <ICollisionManager>();
            screenCollisionManager = ManagerScope.Resolve <IScreenCollisionManager>();
            borderCollisionManager = ManagerScope.Resolve <IBorderCollisionManager>();

            FireBallCounter = new FireBallCounter(tailManager);

            ballStateMachine = new BallStateMachine(
                ManagerScope,
                Bricks,
                HitBrick,
                LostBall);

            ballBuilder = new BallBuilder(
                ballManager,
                tailManager,
                padManager,
                FastBallCounter.TimerHandler);

            ballExtraFeatureBuilder = new BallExtraFeatureBuilder(
                ballManager,
                tailManager,
                ballBuilder,
                FireBallCounter);

            levelBuilder = new LevelBuilder(
                screen,
                levelManager,
                padManager,
                borderManager,
                borderCollisionManager,
                ballBuilder,
                GameConfig,
                Bricks);
        }
Example #3
0
 public LevelBuilder(
     IScreen screen,
     ILevelManager levelManager,
     IPadManager padManager,
     IBorderManager borderManager,
     IBorderCollisionManager borderCollisionManager,
     BallBuilder ballBuilder,
     IGameConfig gameConfig,
     ICollection <IBrick> bricks)
 {
     this.screen                 = screen;
     this.levelManager           = levelManager;
     this.padManager             = padManager;
     this.borderManager          = borderManager;
     this.borderCollisionManager = borderCollisionManager;
     this.ballBuilder            = ballBuilder;
     this.gameConfig             = gameConfig;
     this.bricks                 = bricks;
 }