Ejemplo n.º 1
0
    void OnGUI()
    {
        //draw stuff
        if (IsInsideMenuArea())
        {
            exitArea = true;
        }

        if (exitArea)
        {
            if (fadingIn)
            {
                StartFadingIn();
            }
            GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), blackTexture);
        }

        if (fadingOut)                  //fading in to black is finished
        {
            CollectibleItem.resetCollectedItems();
            fadingOut = false;
            if (_once)
            {
                return;
            }
            _once = true;
            SceneManager.LoadScene("Launcher");
        }
    }