示例#1
0
 void Update()
 {
     if (currentState != null)
     {
         currentState.OnUpdate();
     }
 }
示例#2
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            ScreenCapture.CaptureScreenshot(Time.time.ToString() + ".png");
        }

        if (currentState != null)
        {
            currentState.OnUpdate();
        }
    }
示例#3
0
 void Update()
 {
     if (difficulty == 1)
     {
         Time.timeScale = 2;
     }
     else
     {
         Time.timeScale = 1;
     }
     if (currentState != null)
     {
         currentState.OnUpdate();
     }
 }