Exemple #1
0
    IEnumerator PauseForDramaticEffect()
    {
        //  LevelManager.Instance.Player1.GetComponent<Movement>().enabled = false;
        //   LevelManager.Instance.Player2.GetComponent<Movement>().enabled = false;
        GlobalStuff.FreezeSpawning();
        GlobalStuff.FreezeAllMovement();
        GlobalStuff.LoseAllControl();
        yield return(new WaitForSeconds(.5f));

        childWithParticleSystem.SetActive(true);
        yield return(new WaitForSeconds(2f));

        FlashScreenUI.Instance.FlashScreen(0, 1f);
        yield return(new WaitForSeconds(1.5f));

        FlashScreenUI.Instance.FlashScreen(1, 1f);
        yield return(new WaitForSeconds(1.5f));

        FlashScreenUI.Instance.FlashScreen(0, .5f);
        yield return(new WaitForSeconds(.6f));

        FlashScreenUI.Instance.FlashScreen(1, .4f);
        yield return(new WaitForSeconds(.6f));

        FlashScreenUI.Instance.FlashScreen(0, .4f);
        yield return(new WaitForSeconds(.6f));

        FlashScreenUI.Instance.FlashScreen(2, 1f);
        yield return(new WaitForSeconds(.9f));

        childWithParticleSystem.SetActive(false);
        yield return(new WaitForSeconds(.5f));

        DeactivateUltimate();
    }
Exemple #2
0
    public override void Die()
    {
        isPlayerDead = true;

        if (!LevelManager.Instance.isOnePlayerDead)
        {
            LevelManager.Instance.isOnePlayerDead = true;
            DisablePlayer();
        }
        else
        {
            GlobalStuff.FreezeSpawning();
            GlobalStuff.FreezeAllMovement();
            Debug.Log("Game Over");
            gameOverText.SetActive(true);

            StartCoroutine(EndGameWait());
            // TODO: GameOver
        }
    }