Exemplo n.º 1
0
    private bool EndingConditionReached()
    {
        if (playerController.Health <= 0)
        {
            CurrentStage.SetStageResult(StageResult.Loss);
            AudioManager.Instance.PlaySoundAndPauseMusic(AudioGameOver);
            return(true);
        }
        if (CurrentStage.WinConditionReached())
        {
            CurrentStage.SetStageResult(StageResult.Win);
            if (gameState == GameState.Stage3)
            {
                AudioManager.Instance.PlaySoundAndPauseMusic(AudioWin);
            }
            else
            {
                AudioManager.Instance.PlaySound(AudioStageComplete);
            }
            return(true);
        }


        return(false);
    }