Exemplo n.º 1
0
 public void PlayerVictory()
 {
     DriverCabinDoorLock.bIsUnlocked = false;
     victoryFader.FadeIn(4f, () =>
     {
         SceneManager.LoadScene("Victory");
     });
 }
    void PlayRageCutscene(RageMode rage)
    {
        EnablePlayerControls(false);
        PauseGame();

        currentRageMode  = rage;
        videoPlayer.clip = rage.rageClip;

        imageFader.FadeIn();
    }
Exemplo n.º 3
0
    IEnumerator win()
    {
        Player.main.freeze = true;
        black.FadeIn(2f);
        yield return(new WaitForSeconds(2f));

        gameWinMessage.SetActive(true);
        var input = ReInput.players.GetPlayer(0);

        while (true)
        {
            if (input.GetButtonDown("Fire"))
            {
                break;
            }
            yield return(null);
        }
        Cursor.lockState = CursorLockMode.None;
        SceneManager.LoadScene(0);
    }
Exemplo n.º 4
0
    private IEnumerator ENDGAME()
    {
        float faderWaitTime = fader ? waitTime - fader.fadeDuration : 0;

        yield return(new WaitForSeconds(fader ? faderWaitTime : waitTime));

        fader?.FadeIn();

        yield return(new WaitForSeconds(fader ? fader.fadeDuration : 0));

        SceneManager.LoadScene("Main Menu", LoadSceneMode.Single);
    }
Exemplo n.º 5
0
    public void KillPlayer(string gameOverTextKey, bool fadeInstantly = false)
    {
        if (isDead == true)
        {
            return;
        }

        isDead = true;
        DriverCabinDoorLock.bIsUnlocked = false;
        m_DeathFader.FadeIn((fadeInstantly) ? 0 : FadeTime, () =>
        {
            m_GameOverTextKey = gameOverTextKey;
            SceneManager.LoadScene("GameOver");
        });
    }
Exemplo n.º 6
0
 void onBackFromLearningWithAdvisorClicked()
 {
     imageFader.FadeIn(switchToGeneticsLearningFromLearningWithAdvisor);
 }