예제 #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);
        }
예제 #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);
        }