📅  最后修改于: 2022-03-11 14:48:55.701000             🧑  作者: Mango
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
}
}