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");
  }
}

posted on 2016-02-23 16:07  陈二狗  阅读(145)  评论(0)    收藏  举报

导航