Exemplo n.º 1
0
 public void Initialize()
 {
     _spawnPointController = (SpawnPointController)ControllerMaster.InjectController(typeof(SpawnPointController));
     InitializeEnemies();
     _playerLayer   = LayerMask.GetMask("Player");
     _obstacleLayer = LayerMask.GetMask("Default");
 }
Exemplo n.º 2
0
        public void Initialize()
        {
            _playerController     = (PlayerController)ControllerMaster.InjectController(typeof(PlayerController));
            _uiController         = (UiController)ControllerMaster.InjectController(typeof(UiController));
            _spawnPointController = (SpawnPointController)ControllerMaster.InjectController(typeof(SpawnPointController));

            InitializeBonuses();
        }
Exemplo n.º 3
0
        public void Initialize()
        {
            _uiController     = (UiController)ControllerMaster.InjectController(typeof(UiController));
            _cameraController = (CameraController)ControllerMaster.InjectController(typeof(CameraController));

            _playerMovementService = new PlayerMovementService(_playerData);
            _playerActionService   = new PlayerActionService(_uiController, _playerData);

            _uiController.UiView.DefaultSpeedValue = _playerActionService.DefaultSpeed;
        }
Exemplo n.º 4
0
        private void Start()
        {
            var menu   = gameObject.GetComponentInChildren <Menu>();
            var uiView = gameObject.GetComponentInChildren <UIView>();

            _data.PlayerData.player = GameObject.FindWithTag("Player");
            var bulletController     = new BulletController(_data.BulletData);
            var uiController         = new UiController(menu, uiView);
            var playerController     = new PlayerController(_data.PlayerData);
            var cameraController     = new CameraController(_data.CameraData);
            var spawnPointController = new SpawnPointController(_data.SpawnPointData);
            var bonusController      = new BonusController(_data.BonusData);
            var enemyController      = new EnemyController(_data.EnemyData);

            _controllerMaster = new ControllerMaster();
            _controllerMaster.Add(playerController);
            _controllerMaster.Add(cameraController);
            _controllerMaster.Add(spawnPointController);
            _controllerMaster.Add(bonusController);
            _controllerMaster.Add(uiController);
            _controllerMaster.Add(enemyController);
            _controllerMaster.Add(bulletController);
            _controllerMaster.Initialize();
        }
Exemplo n.º 5
0
        public void Initialize()
        {
            PlayerController playerController = (PlayerController)ControllerMaster.InjectController(typeof(PlayerController));

            _cameraService = new CameraService(_cameraData, playerController.GetData());
        }