📜  简单的时间 c# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.701000             🧑  作者: Mango

代码示例1
public float timeLeft = 20.0f; //you can change this aswell

void Update()
{
timeLeft -= Time.deltaTime; //you can change this to just removing a number
            if (timeLeft < 0)
            {
            //Method here
            timeLeft += 20.0f; //change this to what you want
            }
}