예제 #1
0
        public UniTask Initialize()
        {
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();
            _gameSignal            = DIResolver.GetObject <GameSignals>();
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();

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

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

            return(res);
        }
예제 #3
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);
        }
예제 #4
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);
        }
예제 #5
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;
        }
        public UniTask Initialize()
        {
            _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
            _asteroidGameSettings  = DIResolver.GetObject <AsteroidGameSettings>();

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

            return(UniTask.CompletedTask);
        }
예제 #7
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);
        }
예제 #8
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);
        }
예제 #9
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);
        }
예제 #10
0
 protected override void OnInit()
 {
     base.OnInit();
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
 }
예제 #11
0
 protected override Task OnUISceneInit()
 {
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
     return(Task.CompletedTask);
 }
예제 #12
0
 public UniTask Initialize()
 {
     _bookKeepingInGameData = DIResolver.GetObject <BookKeepingInGameData>();
     return(UniTask.CompletedTask);
 }