示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (m_nowPower <= 0)
     {
         m_resultTextController.EndState = true;
         m_resultTextController.GameOverText();
     }
 }
    // Update is called once per frame
    void Update()
    {
        float value = m_powerSlider.GetComponent <Slider>().value;

        if (value <= 0)
        {
            m_resultTextController.EndState = true;
            m_resultTextController.GameOverText();
        }
    }
示例#3
0
    // Update is called once per frame
    void Update()
    {
        if (m_resultTextController.EndState == false)
        {
            m_timeLimit -= Time.deltaTime;
            int seconds = (int)m_timeLimit;
            m_timerText.GetComponent <TextMeshProUGUI>().text = "Time " + seconds + "s";
        }

        if (m_timeLimit <= 0)
        {
            m_resultTextController.EndState = true;
            m_resultTextController.GameOverText();
        }
    }