InvokeRepeating重复定时器
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
void Start () {
InvokeRepeating("launchProjectile", 1,5);//1秒后调用launchProjectile方法,之后每5秒调用一次
}
private void launchProjectile() {
Debug.Log("aaaaaa");
}
}
浙公网安备 33010602011771号