예제 #1
0
파일: Demo08.cs 프로젝트: dtbinh/TAFF
    // MoveIn all primary buttons
    IEnumerator MoveInPrimaryButtons()
    {
        yield return(new WaitForSeconds(1.0f));

        // MoveIn all primary buttons
        m_CenterButtons.MoveIn(GSui.eGUIMove.SelfAndChildren);

        // Enable all scene switch buttons
        StartCoroutine(EnableAllDemoButtons());
    }
예제 #2
0
    // ########################################
    // MoveIn/MoveOut functions
    // ########################################

    #region MoveIn/MoveOut

    // MoveIn m_Title1 and m_Title2
    IEnumerator MoveInTitleGameObjects()
    {
        yield return(new WaitForSeconds(1.0f));

        // MoveIn m_Title1 and m_Title2
        m_Title1.MoveIn(GSui.eGUIMove.Self);
        m_Title2.MoveIn(GSui.eGUIMove.Self);

        // MoveIn m_Dialog
        StartCoroutine(ShowDialog());
    }
예제 #3
0
파일: Demo01.cs 프로젝트: dtbinh/TAFF
    // ########################################
    // MoveIn/MoveOut functions
    // ########################################

    #region MoveIn/MoveOut

    // MoveIn m_Title1 and m_Title2
    IEnumerator MoveInTitleGameObjects()
    {
        yield return(new WaitForSeconds(1.0f));

        // MoveIn m_Title1 and m_Title2
        m_Title1.MoveIn(GSui.eGUIMove.Self);
        m_Title2.MoveIn(GSui.eGUIMove.Self);

        // MoveIn all primary buttons
        StartCoroutine(MoveInPrimaryButtons());
    }
예제 #4
0
파일: Demo01.cs 프로젝트: dtbinh/TAFF
    // MoveIn all primary buttons
    IEnumerator MoveInPrimaryButtons()
    {
        yield return(new WaitForSeconds(1.0f));

        // MoveIn all primary buttons
        m_TopLeft_A.MoveIn(GSui.eGUIMove.Self);
        m_BottomLeft_A.MoveIn(GSui.eGUIMove.Self);
        m_RightBar_A.MoveIn(GSui.eGUIMove.Self);

        // Enable all scene switch buttons
        StartCoroutine(EnableAllDemoButtons());
    }
예제 #5
0
    // ########################################
    // Functions
    // ########################################

    #region Functions

    IEnumerator ShowLevelSelect()
    {
        // Creates a yield instruction to wait for a given number of seconds
        // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html
        yield return(new WaitForSeconds(0.25f));

        // Play MoveIn animation
        m_Banner.MoveIn();

        // Update Loading progress bar.
        StartCoroutine(ShowPage0());
    }
예제 #6
0
    // Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
    // http://docs.unity3d.com/ScriptReference/MonoBehaviour.Start.html
    void Start()
    {
        // MoveIn m_TopBar and m_BottomBar
        m_TopBar.MoveIn(GSui.eGUIMove.SelfAndChildren);
        m_BottomBar.MoveIn(GSui.eGUIMove.SelfAndChildren);

        // MoveIn m_Title1 m_Title2
        StartCoroutine(MoveInTitleGameObjects());

        // Disable all scene switch buttons
        // http://docs.unity3d.com/Manual/script-GraphicRaycaster.html
        GSui.Instance.SetGraphicRaycasterEnable(m_Canvas, false);
    }
    IEnumerator ShowQuestions()
    {
        yield return(new WaitForSeconds(0.2f));

        readyImg.MoveIn();

        yield return(new WaitForSeconds(1));

        readyImg.MoveOut();

        yield return(new WaitForSeconds(1));

        OnClickQuestion(arr[qIndex]);
    }
예제 #8
0
 // Toggle m_Button5
 void ToggleButton_5()
 {
     m_Button5_IsOn = !m_Button5_IsOn;
     if (m_Button5_IsOn == true)
     {
         // MoveIn m_SecondaryButton5
         m_SecondaryButton5.MoveIn(GSui.eGUIMove.SelfAndChildren);
     }
     else
     {
         // MoveOut m_SecondaryButton5
         m_SecondaryButton5.MoveOut(GSui.eGUIMove.SelfAndChildren);
     }
 }
예제 #9
0
파일: Demo01.cs 프로젝트: dtbinh/TAFF
 // Toggle BottomLeft buttons
 void ToggleBottomLeft()
 {
     m_BottomLeft_IsOn = !m_BottomLeft_IsOn;
     if (m_BottomLeft_IsOn == true)
     {
         // m_BottomLeft_B moves in
         m_BottomLeft_B.MoveIn(GSui.eGUIMove.SelfAndChildren);
     }
     else
     {
         // m_BottomLeft_B moves out
         m_BottomLeft_B.MoveOut(GSui.eGUIMove.SelfAndChildren);
     }
 }
예제 #10
0
 public void FoldMenu()
 {
     if (MenuMoveIn)
     {
         RestartButton.MoveIn(GUIAnimSystem.eGUIMove.SelfAndChildren);
         HomeButton.MoveIn(GUIAnimSystem.eGUIMove.SelfAndChildren);
     }
     else
     {
         RestartButton.MoveOut(GUIAnimSystem.eGUIMove.SelfAndChildren);
         HomeButton.MoveOut(GUIAnimSystem.eGUIMove.SelfAndChildren);
     }
     MenuMoveIn = !MenuMoveIn;
 }
예제 #11
0
파일: Demo08.cs 프로젝트: dtbinh/TAFF
 // Toggle m_Bar4
 void ToggleBar4()
 {
     m_Bar4_IsOn = !m_Bar4_IsOn;
     if (m_Bar4_IsOn == true)
     {
         // m_Bar4 moves in
         m_Bar4.MoveIn(GSui.eGUIMove.SelfAndChildren);
     }
     else
     {
         // m_Bar4 moves out
         m_Bar4.MoveOut(GSui.eGUIMove.SelfAndChildren);
     }
 }
예제 #12
0
    // MoveIn all primary buttons
    IEnumerator MoveInPrimaryButtons()
    {
        yield return(new WaitForSeconds(1.0f));

        // MoveIn all primary buttons
        m_PrimaryButton1.MoveIn(GSui.eGUIMove.Self);
        m_PrimaryButton2.MoveIn(GSui.eGUIMove.Self);
        m_PrimaryButton3.MoveIn(GSui.eGUIMove.Self);
        m_PrimaryButton4.MoveIn(GSui.eGUIMove.Self);

        m_PrimaryButton5.MoveIn(GSui.eGUIMove.Self);

        // Enable all scene switch buttons
        StartCoroutine(EnableAllDemoButtons());
    }
예제 #13
0
    // ########################################
    // MoveIn/MoveOut functions
    // ########################################

    #region MoveIn/MoveOut

    // Move In m_Title1 and m_Title2
    IEnumerator MoveInTitleGameObjects()
    {
        yield return(new WaitForSeconds(1.0f));

        // Move In m_Title1 and m_Title2
        m_Title1.MoveIn(GSui.eGUIMove.Self);
        m_Title2.MoveIn(GSui.eGUIMove.Self);

        // MoveIn dialogs
        StartCoroutine(MoveInPrimaryButtons());

        // Enable all scene switch buttons
        // http://docs.unity3d.com/Manual/script-GraphicRaycaster.html
        GSui.Instance.SetGraphicRaycasterEnable(m_Canvas, true);
    }
예제 #14
0
파일: Demo01.cs 프로젝트: dtbinh/TAFF
 // Toggle RightBar buttons
 void ToggleRightBar()
 {
     m_RightBar_IsOn = !m_RightBar_IsOn;
     if (m_RightBar_IsOn == true)
     {
         // m_RightBar_A moves out
         m_RightBar_A.MoveOut(GSui.eGUIMove.SelfAndChildren);
         // m_RightBar_B moves in
         m_RightBar_B.MoveIn(GSui.eGUIMove.SelfAndChildren);
     }
     else
     {
         // m_RightBar_A moves in
         m_RightBar_A.MoveIn(GSui.eGUIMove.SelfAndChildren);
         // m_RightBar_B moves out
         m_RightBar_B.MoveOut(GSui.eGUIMove.SelfAndChildren);
     }
 }
예제 #15
0
    IEnumerator ReadyPanel()
    {
        if (!readyPanel.gameObject.activeInHierarchy)
        {
            readyPanel.gameObject.SetActive(true);
        }

        yield return(new WaitForSeconds(0.2f));

        readyPanel.MoveIn();

        yield return(new WaitForSeconds(1f));

        readyPanel.MoveOut();

        // Start generating questions
        StartCoroutine(PrepareQuestion());
    }
예제 #16
0
    public void  TutorialMode_isOn()
    {
        if (PlayerPrefs.GetInt("TUTORIAL_MODE", 1) == 1)
        {
            isTutorialMode = true;

            welcomeTutorialPanel.MoveIn();

            welcomeTutorialPanel.gameObject.transform.parent.GetComponent <Image>().enabled = true;
        }
        else
        {
            isTutorialMode = false;

            welcomeTutorialPanel.gameObject.SetActive(false);

            MCTutorial.Instance.finger.SetActive(false);
        }
    }
예제 #17
0
    IEnumerator StartAnimate()
    {
        yield return(new WaitForSeconds(0.1f));

        logoStart.MoveIn();
        butStart.MoveIn();

        if (PlayerPrefs.GetInt("PARENT_GUIDE", 0) == 0)
        {
            // Show parent guide.
            parentPanel.SetActive(true);
            parentPanel.GetComponent <GAui>().MoveIn();
            blackBG.SetActive(true);
        }
        else
        {
            parentPanel.SetActive(false);
        }
    }
예제 #18
0
    public void OnClickAR()
    {
        int purchase = ZPlayerPrefs.GetInt("ACTIVATED", 0);

        // Testing only
        // TestDev
        // LoadingARScene();
        // return;

        if (purchase == 0)
        {
            blackBG.SetActive(true);
            // SceneManager.LoadScene("QRScene");
            activatePanel.MoveIn();
            curActivePanel = activatePanel.gameObject;
        }
        else
        {
            LoadingARScene();
        }
    }
    // Show and add +1 trophy when the player get 3 stars.
    IEnumerator ShowTrophy()
    {
        yield return(new WaitForSeconds(0.5f));

        trophiImage.gameObject.SetActive(true);
        particle.SetActive(false);
        particle.SetActive(true);
        trophiImage.MoveIn();

        celebrateAudioSource.clip = celebrateSound;
        celebrateAudioSource.Play();

        yield return(new WaitForSeconds(3));

        celebrateAudioSource.clip = trophyMoveOut;
        celebrateAudioSource.Play();

        trophiImage.MoveOut();

        ResetScore();

        yield return(new WaitForSeconds(1f));

        // Increase trophy count
        trophyCount++;

        PlayerPrefs.SetInt("LPL_TrophyCount", trophyCount);

        trophyCountText.text = trophyCount.ToString();

        yield return(new WaitForSeconds(0.5f));

        // Ask the user to start next round.
        //OnClickQuestion(arr[qIndex]);
        black.SetActive(true);
        continueWindow.MoveIn();
    }
예제 #20
0
    IEnumerator ShowArrows()
    {
        // Creates a yield instruction to wait for a given number of seconds
        // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html
        yield return(new WaitForSeconds(0.5f));

        m_ArrowLeft.m_ScaleIn.Delay = Random.Range(0.5f, 1.0f);
        m_ArrowLeft.m_ScaleIn.Time  = Random.Range(0.5f, 1.0f);

        // Play MoveIn animation
        m_ArrowLeft.MoveIn();

        m_ArrowRight.m_ScaleIn.Delay = Random.Range(0.5f, 1.0f);
        m_ArrowRight.m_ScaleIn.Time  = Random.Range(0.5f, 1.0f);

        // Play MoveIn animation
        m_ArrowRight.MoveIn();

        // Play MoveIn animations
        m_Page_0_Dot.MoveIn();
        m_Page_1_Dot.MoveIn();

        UpdateArrowButtons();
    }
예제 #21
0
    IEnumerator IncStar()
    {
        yield return(new WaitForSeconds(1.2f));

        if (isCorrect)
        {
            isCorrect = false;

            // Increase star count

            stars[starCount - 1].sprite = starSpecial;
            starParticles[starCount - 1].SetActive(true);

            audioSource.clip = starSound;
            audioSource.Play();

            // Check and reset stars.
            if (starCount == stars.Length)
            {
                trophyParticle.SetActive(false);
                trophyParticle.SetActive(true);

                audioSource.clip = trophySound;
                audioSource.Play();

                trophy.transform.localPosition = new Vector2(-226, 0);

                if (!trophy.gameObject.activeInHierarchy)
                {
                    trophy.gameObject.SetActive(true);
                }

                // Show Trophy
                trophy.MoveIn();

                Destroy(curObject);

                yield return(new WaitForSeconds(1.5f));

                trophy.MoveOut();

                for (int i = 0; i < stars.Length; i++)
                {
                    stars[i].sprite = starNormal;
                    starParticles[i].SetActive(false);
                }

                starCount = 0;

                yield return(new WaitForSeconds(1));

                trophyCount++;
                PlayerPrefs.SetInt("TrophyCount", trophyCount);
                trophyText.text = trophyCount.ToString();

                blackBG.SetActive(true);

                if (!continuePanel.gameObject.activeInHierarchy)
                {
                    continuePanel.gameObject.SetActive(true);
                }

                continuePanel.MoveIn();
            }
        }
    }
예제 #22
0
 public void GameOver()
 {
     gameOverMask.SetActive(true);
     gameOverGaui.gameObject.SetActive(true);
     gameOverGaui.MoveIn();
 }