Esempio n. 1
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. 2
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);
        }