예제 #1
0
 private void OnLivesCountChanged(int lives)
 {
     GameStates s = GameStateHelper.GetState(
         m_spawnFinishedObservable.SpawnFinished.Value,
         lives,
         m_enemiesCountObservable.Enemies.Value
         );
 }
예제 #2
0
 private void OnSpawnFinished(bool finished)
 {
     GameStates s = GameStateHelper.GetState(
         finished,
         m_livesObservable.Lives.Value,
         m_enemiesCountObservable.Enemies.Value
         );
 }
예제 #3
0
        private void OnEnemiesCountChanged(int enemies)
        {
            GameStates s = GameStateHelper.GetState(
                m_spawnFinishedObservable.SpawnFinished.Value,
                m_livesObservable.Lives.Value,
                enemies
                );

            if (s == GameStates.Win)
            {
                Debug.LogError($"WIN");
                //TODO Move to DeathPresenter
                SceneManager
                .LoadScene("ProjectAssets/Scenes/Win");
            }

            if (s == GameStates.Lose)
            {
                Debug.LogError($"LOSE");
                //TODO Move to DeathPresenter
                SceneManager
                .LoadScene("ProjectAssets/Scenes/Lose");
            }
        }