示例#1
0
 public CaptureBiome(int backgroundIndex, int backgroundIndex2, int waterStyle, TileColorStyle tileColorStyle = TileColorStyle.Normal)
 {
     BackgroundIndex = backgroundIndex;
     BackgroundIndex2 = backgroundIndex2;
     WaterStyle = waterStyle;
     TileColor = tileColorStyle;
 }
示例#2
0
        public void Awake()
        {
            var tileStyleRepository = new TileStyleRepository();
            var tileStyle           = tileStyleRepository.ObtainDefault();
            var tileFactory         = new TileFactory();
            var boardFactory        = new BoardFactory(tileFactory);

            var boardSettingsRepository = new BoardSettingsRepository();
            var boardSettings           = boardSettingsRepository.ObtainDefault();
            var board = boardFactory.Create(boardSettings, tileStyle);

            var boardMouseEventsNotifier = new MouseEventsNotifier(board);

            boardMouseEventsNotifier.Enable();

            var ballSelectionEventsNotifier = new BallSelectionEventsNotifier(boardMouseEventsNotifier);

            ballSelectionEventsNotifier.Enable();

            var pathfinder = new Pathfinder();
            var ballMoveControllerFactory = new BallMoveControllerFactory(pathfinder);
            var ballMoveController        = ballMoveControllerFactory.Create(ballSelectionEventsNotifier);

            ballMoveController.Enable();

            var ballBounceManager    = new BallBounceManager(board);
            var ballBounceController = new BallBounceController(ballSelectionEventsNotifier, ballBounceManager);

            ballBounceController.Enable();

            var ballMaterialSettingsRepository        = new BallMaterialSettingsRepository();
            var ballStyleRepository                   = new BallStyleRepositoryFactory(ballMaterialSettingsRepository).Create();
            var ballLifetimeManagerSettingsRepository = new BallLifetimeManagerSettingsRepository();
            var ballLifetimeManagerSettings           = ballLifetimeManagerSettingsRepository.ObtainDefault();
            var ballFactory             = new BallFactory();
            var random                  = new System.Random();
            var ballSpawnManagerFactory = new BallSpawnManagerFactory(
                ballLifetimeManagerSettings,
                ballStyleRepository,
                ballFactory,
                random
                );
            var ballColorPool = new BallColorPoolRepository().ObtainDefault();

            ballSpawnManager = ballSpawnManagerFactory.Create(board, ballColorPool);
            var ballPopManager         = new BallPopManager(board);
            var ballLifespanController = new BallLifespanController(ballSpawnManager, ballPopManager);

            ballLifespanController.Enable();

            var tileColorStyle = new TileColorStyle(
                TileColorStyleHelper.CreateVariantColorGroup(
                    tileStyle.ColorStyle.ForegroundColorGroup.IdleColor
                    ),
                tileStyle.ColorStyle.BorderColorGroup
                );
            var boardHighlightController = new BoardHighlightController(boardMouseEventsNotifier, tileColorStyle);

            boardHighlightController.Enable();
        }
示例#3
0
 public CaptureBiome(int backgroundIndex, int backgroundIndex2, int waterStyle, TileColorStyle tileColorStyle = TileColorStyle.Normal)
 {
     BackgroundIndex  = backgroundIndex;
     BackgroundIndex2 = backgroundIndex2;
     WaterStyle       = waterStyle;
     TileColor        = tileColorStyle;
 }
示例#4
0
 protected BoardHighlightController(
     BoardMouseEventsNotifier boardMouseEventsNotifier,
     TileColorStyle tileColorStyle
     )
 {
     this.boardMouseEventsNotifier = boardMouseEventsNotifier;
     this.TileColorStyle           = tileColorStyle;
 }
示例#5
0
 public BoardHighlightController Create(
     BoardMouseEventsNotifier boardMouseEventsNotifier,
     TileColorStyle tileColorStyle
     )
 {
     return(new BoardHighlightController(boardMouseEventsNotifier, tileColorStyle)
     {
         tileHighlightManager = TileHighlightManager
     });
 }