Ejemplo n.º 1
0
        public Board(int width, int height, ISpawnManager spawnManager, ICheckManager checkManager, ICellRegistrator cellRegistrator)
        {
            _width           = width;
            _height          = height;
            _spawnManager    = spawnManager;
            _checkManager    = checkManager;
            _cellRegistrator = cellRegistrator;
            _cells           = new ICell[_width, _height];

            _checkManager.Board = this;
        }
Ejemplo n.º 2
0
        private void Initial()
        {
            _updateManager        = _NavigationManager.MasterManager.UpdateManager;
            _gameplayLogicManager = new GameObject("Gameplay Logic Manager").AddComponent <GameplayLogicManager>();
            GameObject empty = new GameObject("---------------");

            _gameplayNotifier = _NavigationManager.MasterManager.GameplayNotifier;
            _uiNotifier       = _NavigationManager.MasterManager.UINotifier;
            _taskNotifier     = new Notifier();

            _inputManager = new InputManager(_gameplayNotifier);
            _spawnManager = _NavigationManager.MasterManager.SpawnManager;
            _checkManager = new CheckManager();
            _taskManager  = new TaskManager(_level.LevelTasks);

            _uiManager      = new UIGameplayLevelManager(_level);
            _buttonsManager = new ButtonsGameplaySceneManager(_uiNotifier);

            _cellRegistrator = new CellRegistrator(_gameplayNotifier, _updateManager);

            _board = new Board(_level.BoardWidth, _level.BoardHeight, _spawnManager, _checkManager, _cellRegistrator);
        }
Ejemplo n.º 3
0
        public static IBoard CreateBoard(int width, int height, out IMasterManager masterManager, out ICellRegistrator cellRegistrator)
        {
            masterManager = CreateMasterManager();

            ISpawnManager  spawnManager  = masterManager.SpawnManager;
            INotifier      notifier      = masterManager.GameplayNotifier;
            IUpdateManager updateManager = masterManager.UpdateManager;
            ICheckManager  checkManager  = new CheckManager();

            cellRegistrator = new CellRegistrator(notifier, updateManager);

            IBoard board = new Board(width, height, spawnManager, checkManager, cellRegistrator);

            return(board);
        }
Ejemplo n.º 4
0
        public void CellRegistrator_Create_NotNull()
        {
            ICellRegistrator cellRegistrator = ObjectsCreator.CreateCellRegistrator();

            Assert.IsNotNull(cellRegistrator);
        }