示例#1
0
    void GoBack()
    {
        AudioController.Instance.Play(AudioController.SoundType.Button);

        PopUpGeneral gen = (Instantiate(popUpQuit) as GameObject).GetComponent <PopUpGeneral>();

        gen.isQuit = true;
    }
示例#2
0
    void GoBack()
    {
        AudioController.Instance.Play(AudioController.SoundType.Button);

        PopUpGeneral popUpGen = (Instantiate(popUpGeneral) as GameObject).GetComponent <PopUpGeneral>();

        popUpGen.isQuit     = true;
        popUpGen.goBackHome = true;
        popUpGen.SetGO(this.gameObject);
    }
示例#3
0
    void Fail()
    {
        isFail = true;

        PopUpGeneral pg = (Instantiate(popUpGeneral) as GameObject).GetComponent <PopUpGeneral>();

        pg.isFail    = true;
        pg.failLevel = level;
        pg.SetGO(this.gameObject);

        if (remainedTime <= 0)
        {
            pg.failTimeIsOver = true;
        }
    }
示例#4
0
    void GUIMenu()
    {
        guiRect.Set(0, Screen.height - menubg.height - 11, Screen.width, menubg.height);
        GUI.DrawTexture(guiRect, menubg);

        guiRect.Set(30, Screen.height - menubg.height - 2, 50, 49);
        if (GUI.Button(guiRect, "", "ButtonConfig"))
        {
            AudioController.Instance.Play(AudioController.SoundType.Button);

            Instantiate(popUpSettings);
        }

        guiRect.Set(110, Screen.height - menubg.height - 2, 56, 50);
        if (GUI.Button(guiRect, "", "ButtonHome"))
        {
            GoBack();
        }

        //if (tela == 1)
        //{
        //    guiRect.Set(196, Screen.height - menubg.height - 1, 42, 49);
        //    if (GUI.Button(guiRect, "", "ButtonLevels"))
        //    {
        //        AudioController.Instance.Play(AudioController.SoundType.Button);

        //        Destroy(this.gameObject);

        //        Instantiate(screenLevels);
        //    }
        //}
        //else if (tela == 2)
        //{
        guiRect.Set(196, Screen.height - menubg.height - 1, 32, 48);
        if (GUI.Button(guiRect, "", "ButtonTutorial"))
        {
            AudioController.Instance.Play(AudioController.SoundType.Button);

            PopUpTutorial pt = (Instantiate(popUpTutorial) as GameObject).GetComponent <PopUpTutorial>();
            pt.tutorialNr = level;
            if (tela == 1)
            {
                tela1tutorial = true;
            }
        }

        guiRect.Set(258, Screen.height - menubg.height - 1, 42, 49);
        if (GUI.Button(guiRect, "", "ButtonLevels"))
        {
            AudioController.Instance.Play(AudioController.SoundType.Button);

            Destroy(this.gameObject);

            Instantiate(screenLevels);
        }

        //guiRect.Set(Screen.width - 241, Screen.height - menubg.height + 3, 56, 41);
        //if (GUI.Button(guiRect, "", "ButtonBack"))
        //{
        //    AudioController.Instance.Play(AudioController.SoundType.Button);

        //    tela = 1;

        //    Reset();
        //}
        //}

        guiRect.Set(Screen.width - 155, Screen.height - menubg.height + 1, 44, 45);
        if (GUI.Button(guiRect, "", "ButtonPause"))
        {
            AudioController.Instance.Play(AudioController.SoundType.Button);

            PopUpGeneral popUpGen = (Instantiate(popUpGeneral) as GameObject).GetComponent <PopUpGeneral>();
            popUpGen.isPause = true;
        }

        guiRect.Set(Screen.width - 81, Screen.height - menubg.height - 2, 51, 51);
        if (GUI.Button(guiRect, "", "ButtonRestart"))
        {
            AudioController.Instance.Play(AudioController.SoundType.Button);

            PopUpGeneral popUpGen = (Instantiate(popUpGeneral) as GameObject).GetComponent <PopUpGeneral>();
            popUpGen.isReset = true;
            popUpGen.SetGO(this.gameObject);
        }
    }