Exemplo n.º 1
0
    IEnumerator ReloadScene()
    {
        particleColorSet(GetCurrentColor());
        juice.Play();
        die.Play();
        Time.timeScale      = 1f / slowness;
        Time.fixedDeltaTime = Time.fixedDeltaTime / slowness;
        bodySprite.color    = new Color(255f, 255f, 255, 0f);
        eyesSprite.color    = new Color(255f, 255f, 255, 0f);
        GuiControl.SetHighSocre();
        yield return(new WaitForSeconds(4f / slowness));

        Time.timeScale      = 1f;
        Time.fixedDeltaTime = Time.fixedDeltaTime * slowness;
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
    }