Пример #1
0
    public void CloseMenu()
    {
        if (dontSoundOnStartUp == false && buyPanelActive == true)
        {
            audioOut.PlayOneShot(acClickOff, 0.8f);
        }
        else
        {
            dontSoundOnStartUp = false;
        }

        fpPanel.CloseFinalPanel();

        //win panel can be called like this
        WinPanel script = winPanel.GetComponent <WinPanel>();

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

        // move the canvas out
        backGroundFade.SetActive(false);
        //winPanel.SetActive(false);
        bPanel.SetMovePanelOut();
        buyPanelActive   = false;
        closeMenuOneShot = true;
        DisableMenuButton(false);

        gScript.PauseGame(false);
    }
Пример #2
0
    public void RoundOverMenu() //calling from this function does the same as Open Menu, but disables the menu button until the player clicks new game button
    {
        //next make the button alpha channel faded
        // this doesnt appear to work
        Image img = GetComponent <Image>();
        Color foo = img.color;

        foo.a     = 128f;
        img.color = foo;

        //win panel can be called like this
        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.SetMovePanelOut();
        }

        DisableMenuButton(false);
        roundOver = true;
        OpenMenu();
    }
Пример #3
0
    private void Awake()
    {
        //actPanelObject is the Child Game Object underneat the FinalPlayPanel
        actPanelObject = GameObject.FindGameObjectWithTag("uiFinalActualPanel");
        if (actPanelObject == null)
        {
            Debug.Log("Final Play Panel script couldnt get reference to the Final Actual Panel Game Object");
        }
        else
        {
            actPanelObject.SetActive(true);
        }

        actPanel = gameObject.GetComponentInChildren <WinPanel>();
        if (actPanel == null)
        {
            Debug.Log("Final Play Panel script couldnt get reference to the Win Panel script for the Actual Panel");
        }
        else
        {
            actPanel.SetMovePanelOut();
        }

        playButton = gameObject.GetComponentInChildren <PlayButton>();
        if (playButton == null)
        {
            Debug.Log("FinalPlay Panel Script could not get reference to Play Button script");
        }

        menuB = GameObject.FindGameObjectWithTag("MenuButton").GetComponent <MenuButton>();
        if (menuB == null)
        {
            Debug.Log("FinalPLay Panel Script could not get reference to the Menu Button script.");
        }

        charSelectFinal = GameObject.FindGameObjectWithTag("uiCharSelectedFinal").GetComponent <Image>();
        if (charSelectFinal == null)
        {
            Debug.Log("Final Play script couldnt get reference to the ui element for Character Selected");
        }

        charNameFinal = GameObject.FindGameObjectWithTag("uiCurrentNameFinal").GetComponent <Text>();
        if (charNameFinal == null)
        {
            Debug.Log("Final Play button script could not get a reference to the Buy Panel Character Name Text component.");
        }
    }
Пример #4
0
    public void NextTut()
    {
        audioOut.PlayOneShot(acClickOn, 0.8f);

        progress++;

        if (progress == 8)
        {
            progress = 0;
            tutPanel.SetMovePanelOut();
            gScript.SetTutorialDone();

            //reset the tutorial for the next time it is played
            tutImage.sprite = tutImages[0];
            tuts.text       = tutorials[0];
            bbText.text     = buttonQuotes[0];
        }
        else
        {
            tutImage.sprite = tutImages[progress];
            tuts.text       = tutorials[progress];
            bbText.text     = buttonQuotes[progress];
        }
    }
Пример #5
0
 public void CloseFinalPanel()
 {
     actPanel.SetMovePanelOut();
 }