public float cd = 3f; //间隔时间public float timer = 0; //计时器
// Update is called once per framevoid Update(){
if (Time.time-timer>cd) { print("3秒执行一次"); timer = Time.time; }
}
一棵小松林
Gamer游戏开发者