public UniTask Initialize()
 {
     _playerDataGetter = DIResolver.GetObject <PlayerDataGetter>();
     InitMaps();
     InitCustomMaps();
     return(UniTask.CompletedTask);
 }
Esempio n. 2
0
        public UniTask Initialize()
        {
            _playerDataGetter  = DIResolver.GetObject <PlayerDataGetter>();
            _playerDataMutator = DIResolver.GetObject <PlayerDataMutator>();

            return(UniTask.CompletedTask);
        }
Esempio n. 3
0
        public UniTask Initialize()
        {
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();
            _gameSignal            = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            return(UniTask.CompletedTask);
        }
Esempio n. 4
0
        public UniTask Initialize()
        {
            _gameSignals = DIResolver.GetObject <GameSignals>();

            _gameSignals.GameEntityCollisionTriggeredSignal.Listen(HandleGameEntityCollisionTriggered).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 5
0
        public UniTask Initialize()
        {
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _asteroidSpawnerSystem = DIResolver.GetObject <AsteroidSpawnerSystem>();
            _asteroidAssetSource   = DIResolver.GetObject <AsteroidGameAssetSource>();

            _gameSignals.AsteroidDespawnedSignal.Listen(HandleAsteroidDespawned).AddTo(disposables);
            return(UniTask.CompletedTask);
        }
Esempio n. 6
0
        public UniTask Initialize()
        {
            _gameSignals = DIResolver.GetObject <GameSignals>();
            _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();

            _gameSignals.GameEntityDespawnedSignal.Listen(HandleGameEntityDespawned).AddToDisposables(disposables);

            return(UniTask.CompletedTask);
        }
        protected override string OnInit()
        {
            string res = base.OnInit();

            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            return(res);
        }
Esempio n. 8
0
        public UniTask Initialize()
        {
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            _gameSignals.PlayerDespawnedSignal.Listen(HandlePlayerDespawned, PlayerDespawnedPrioritySignal.Priority.DECREASE_PLAYER_LIFE).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 9
0
        public UniTask Initialize()
        {
            pool = DIResolver.GetObject <IMemoryPool <TestPoolableGameObject> >();

            spawnedObject = new List <TestPoolableGameObject>();
            Debug.Log("Start");
            TestCoroutine();
            Debug.Log("End");

            return(UniTask.CompletedTask);
        }
Esempio n. 10
0
        public UniTask Initialize()
        {
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();
            _playerSpawnerSystem   = DIResolver.GetObject <PlayerSpawnerSystem>();

            _gameSignals.PlayerDespawnedSignal.Listen(HandlePlayerDespawned, PlayerDespawnedPrioritySignal.Priority.RESPAWN_PLAYER).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 11
0
        public UniTask Initialize()
        {
            _asteroidGameSettings     = DIResolver.GetObject <AsteroidGameSettings>();
            _gameSignals              = DIResolver.GetObject <GameSignals>();
            _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();

            _gameSignals.GameStartSignal.Listen(HandleGameStart, GameStartPrioritySignal.PRIORITY_SETUP_SPAWN_ENEMY).AddTo(disposables);
            _gameSignals.GameEntityDespawnedSignal.Listen(HandleGameEntityDespawned).AddToDisposables(disposables);

            return(UniTask.CompletedTask);
        }
        public UniTask Initialize()
        {
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();

            _bookKeepingInGameData.Score.Subscribe(x =>
            {
                EvaluateScore(x);
            }).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 13
0
        public async UniTask Initialize()
        {
            _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            _gameSignals.GameStartSignal.Listen(HandleGameStart, GameStartPrioritySignal.PRIORITY_SPAWN_PLAYER).AddToDisposables(disposables);
            _gameSignals.GameEntityDespawnedSignal.Listen(HandleGameEntityDespawned).AddToDisposables(disposables);

            await UniTask.CompletedTask;
        }
Esempio n. 14
0
        public virtual UniTask Initialize()
        {
            _gameSignals = DIResolver.GetObject <GameSignals>();
            _inputSignal = DIResolver.GetObject <InputSignal>();

            _gameSignals.PlayerSpawnedSignal.Listen(HandlePlayerSpawned).AddTo(disposables);
            _gameSignals.PlayerDespawnedSignal.Listen(HandlePlayerDespawned, PlayerDespawnedPrioritySignal.Priority.UNLISTEN_PLAYER_INPUT).AddTo(disposables);
            _gameSignals.PlayerDoHyperSpaceSignal.Listen(HandlePlayerDoHyperSpace).AddTo(disposables);
            _gameSignals.PlayerHyperSpaceFinishedSignal.Listen(HandlePlayerHyperSpaceFinished).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 15
0
        public UniTask Initialize()
        {
            _highScoreManager      = DIResolver.GetObject <HighScoreManager>();
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            _gameSignals.GameOverSignal.Listen(HandleGameOver).AddToDisposables(disposables);

            _bookKeepingInGameData.HighScore.Value = _highScoreManager.GetCurrentHighScore();

            return(UniTask.CompletedTask);
        }
Esempio n. 16
0
        public UniTask Initialize()
        {
            _gameSignals             = DIResolver.GetObject <GameSignals>();
            _scoreSystem             = DIResolver.GetObject <ScoreSystem>();
            _asteroidScoreDataSource = DIResolver.GetObject <AsteroidScoreDataSourceScriptableObject>();

            _gameSignals.GameStartSignal.Listen(HandleGameStart, GameStartPrioritySignal.PRIORITY_SETUP_ADD_SCORE_SYSTEM).AddTo(disposables);
            _gameSignals.GameOverSignal.Listen(HandleGameOver).AddTo(disposables);
            _gameSignals.AsteroidDespawnedSignal.Listen(HandleAsteroidDespawned).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 17
0
 private void Awake()
 {
     if (rb == null)
     {
         rb = GetComponent <Rigidbody2D>();
     }
     if (_healthComponent == null)
     {
         _healthComponent = GetComponent <EntityHealthComponent>();
     }
     _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();
     _gameSignals = DIResolver.GetObject <GameSignals>();
 }
Esempio n. 18
0
        public UniTask Initialize()
        {
            _gameSignals           = DIResolver.GetObject <GameSignals>();
            _asteroidSpawnerSystem = DIResolver.GetObject <AsteroidSpawnerSystem>();
            _asteroidAssetSource   = DIResolver.GetObject <AsteroidGameAssetSource>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

            _gameSignals.GameStartSignal.Listen(HandleGameStartSignal, GameStartPrioritySignal.PRIORITY_SPAWN_WAVE).AddTo(disposables);
            _gameSignals.AsteroidSpawnedSignal.Listen(HandleAsteroidSpawned).AddTo(disposables);
            _gameSignals.AsteroidDespawnedSignal.Listen(HandleAsteroidDespawned).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 19
0
        public UniTask Initialize()
        {
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
            _gameSignal            = DIResolver.GetObject <GameSignals>();

            _bookKeepingInGameData.PlayerLife.Subscribe(life =>
            {
                if (life == 0)
                {
                    GoToGameOverState();
                }
            }).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 20
0
        public UniTask Initialize()
        {
            _asteroidGameSettings = DIResolver.GetObject <AsteroidGameSettings>();
            _gameSignals          = DIResolver.GetObject <GameSignals>();

            Camera mainCamera = Camera.main;

            minWorldPos = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.minWrapViewportPosition);
            maxWorldPos = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.maxWrapViewportPosition);

            _gameSignals.PlayerSpawnedSignal.Listen(HandlePlayerSpawned).AddTo(disposables);
            _gameSignals.PlayerDespawnedSignal.Listen(HandlePlayerDespawned, PlayerDespawnedPrioritySignal.Priority.REMOVE_FROM_POSITION_WRAPPER).AddTo(disposables);

            _gameSignals.BulletSpawnedSignal.Listen(HandleBulletSpawned).AddTo(disposables);
            _gameSignals.BulletDespawnedSignal.Listen(HandleBulletDespawned).AddTo(disposables);

            _gameSignals.AsteroidSpawnedSignal.Listen(HandleAsteroidSpawned).AddTo(disposables);
            _gameSignals.AsteroidDespawnedSignal.Listen(HandleAsteroidDespawned).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
Esempio n. 21
0
        public UniTask Initialize()
        {
            _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();
            _asteroidGameSettings     = DIResolver.GetObject <AsteroidGameSettings>();
            _asteroidAssetSource      = DIResolver.GetObject <AsteroidGameAssetSource>();
            _gameSignals = DIResolver.GetObject <GameSignals>();

            Camera mainCamera = Camera.main;

            minWorldPos = mainCamera.ViewportToWorldPoint(Vector2.zero);
            maxWorldPos = mainCamera.ViewportToWorldPoint(Vector2.one);

            minAdditionalWorldPos  = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.minAsteroidSpawnAdditionalViewportPosition);
            minAdditionalWorldPos -= minWorldPos;
            maxAdditionalWorldPos  = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.maxAsteroidSpawnAdditionalViewportPosition);
            maxAdditionalWorldPos -= minWorldPos;

            _gameSignals.GameEntityDespawnedSignal.Listen(HandleGameEntityDespawned).AddTo(disposables);

            return(UniTask.CompletedTask);
        }
        public UniTask Initialize()
        {
            _asteroidGameSettings     = DIResolver.GetObject <AsteroidGameSettings>();
            _asteroidGameAssetSource  = DIResolver.GetObject <AsteroidGameAssetSource>();
            _gameSignals              = DIResolver.GetObject <GameSignals>();
            _enemySaucerSpawnerSystem = DIResolver.GetObject <EnemySaucerSpawnerSystem>();

            _gameSignals.GameStartSignal.Listen(HandleGameStart, GameStartPrioritySignal.PRIORITY_SETUP_SPAWN_ENEMY).AddTo(disposables);
            _gameSignals.GameOverSignal.Listen(HandleGameOver).AddTo(disposables);

            Camera mainCamera = Camera.main;

            minWorldPos = mainCamera.ViewportToWorldPoint(Vector2.zero);
            maxWorldPos = mainCamera.ViewportToWorldPoint(Vector2.one);

            minAdditionalWorldPos  = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.minEnemySpawnAdditionalViewportPosition);
            minAdditionalWorldPos -= minWorldPos;
            maxAdditionalWorldPos  = mainCamera.ViewportToWorldPoint(_asteroidGameSettings.maxEnemySpawnAdditionalViewportPosition);
            maxAdditionalWorldPos -= minWorldPos;

            return(UniTask.CompletedTask);
        }
 private void Awake()
 {
     _gameSignals = DIResolver.GetObject <GameSignals>();
 }
Esempio n. 24
0
 protected override void OnInit()
 {
     base.OnInit();
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
 }
Esempio n. 25
0
        protected override void OnInit()
        {
            base.OnInit();

            _gameStarterSystem = DIResolver.GetObject <GameStarterSystem>();
        }
Esempio n. 26
0
 public UniTask Initialize()
 {
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
     return(UniTask.CompletedTask);
 }
Esempio n. 27
0
 /*
  |-------------------
  |   Overrides
  |-------------------
  */
 protected override void OnInit()
 {
     base.OnInit();
     uiManager = DIResolver.GetObject <UIManager>();
 }
Esempio n. 28
0
        public UniTask Initialize()
        {
            _inputSignal = DIResolver.GetObject <InputSignal>();

            return(UniTask.CompletedTask);
        }
Esempio n. 29
0
 protected override Task OnUISceneInit()
 {
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
     return(Task.CompletedTask);
 }
Esempio n. 30
0
 private void Awake()
 {
     _bulletSpawnerSystem = DIResolver.GetObject <BulletSpawnerSystem>();
     fireTime             = 1f;
 }