Invoke
Invoke(methodName:string, time:float):void;
methodName:方法名
time:多少秒后執(zhí)行
InvokeRepeating
1、InvokeRepeating(methodName:string, time:float, repeatRate:float):void;
2聪蘸、methodName:方法名
3福青、time:多少秒后執(zhí)行
4底哥、repeatRate:重復(fù)執(zhí)行間隔
還有兩個(gè)重要的方法:
IsInvoking:用來判斷某方法是否被延時(shí),即將執(zhí)行
CancelInvoke:取消該腳本上的所有延時(shí)方法