示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (PlayerPrefs.GetInt("SISpeedTutorial") == 1)
        {
            tutorialReady = true;
        }

        if (tutorialReady)
        {
            if (!tutorialOver)
            {
                elapsedTime += Time.deltaTime;

                if (elapsedTime > tutorialDelay)
                {
                    showTutorial = true;
                }
            }

            if (zymeScript.getButtonPressed() && showTutorial)
            {
                showTutorial = false;
                zymeScript.setDraw(false);
                tutorialOver = true;
                PlayerPrefs.SetInt("SISpeedTutorial", 0);
                //PlayerPrefs.SetInt("SIFatsTutorial", 1);
                PlayerPrefs.Save();
                Time.timeScale = 1;
            }
        }
    }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     // check if the button was pressed to cancel the tutorial
     if (zymeScript.getButtonPressed())
     {
         showTutorial = false;
         zymeScript.setDraw(false);
         Time.timeScale = 1.0f;
     }
 }