private void OnLivesCountChanged(int lives) { GameStates s = GameStateHelper.GetState( m_spawnFinishedObservable.SpawnFinished.Value, lives, m_enemiesCountObservable.Enemies.Value ); }
private void OnSpawnFinished(bool finished) { GameStates s = GameStateHelper.GetState( finished, m_livesObservable.Lives.Value, m_enemiesCountObservable.Enemies.Value ); }
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"); } }