通过代码实现具有一定频率的时间间隔(Time)
方式一:利用Time.datelTime;
float timeBetween
float timer+=Time.daltaTime;
if(timer>=timeBetween)
{
timer=0f;
********代码*********}
方式二:利用Time.time
public float timeBetween;
float time;
if(Time.time-time>=timeBetween)
{
time=Time.time}
posted on 2017-02-17 21:16 ThisIsRone 阅读(238) 评论(0) 编辑 收藏 举报