Exemple #1
0
    public void OpenWinPanel(bool win)
    {
        winPanel.SetActive(true);
        WinPanel script = winPanel.GetComponent <WinPanel>();

        if (script == null)
        {
            Debug.Log("OpenWinPanel in Menubutton couldnt get reference to the win panel script.");
        }
        else
        {
            script.SetMovePanelIn();
        }

        roundOver = true;
        DisableMenuButton(true);
        gScript.StopRoundTimer();

        if (win == true)
        {
            subWinPanel.SetActive(true);
            long total   = gScript.GetTimeTaken();
            long minutes = total / 60;
            long seconds = total % 60;
            winTime.text  = "You Earned Level " + pScript.GetCharLevel(charIndex).ToString() + " with " + pScript.GetCharName(charIndex) + "!";
            winCoins.text = "" + gScript.GetLevelCoinsCollected().ToString() + "/" + gScript.GetLevelCoins();
        }
        else
        {
            subWinPanel.SetActive(false);
        }
    }
Exemple #2
0
    public void OpenFinalPanel()
    {
        actPanelObject.SetActive(true);

        playButton.SetCharIndex(menuB.GetCharIndex());
        charSelectFinal.sprite = menuB.GetCharSprite();
        charNameFinal.text     = menuB.GetCharName();

        actPanel.SetMovePanelIn();
    }