Invoke
Invoke(string methodName,float time):输入一个方法名称,过个几秒来执行一次
methodName:方法名称
time:几秒后执行
InvokeRepeating(string methodName,float time,float repeatRate):重复调用
methodName:方法名称
time:几秒后执行
repeatRate:重复间隔时间
Cancel Invoke(string methodName):取消调用,使用无参重载就是取消全部
using System.Collections;
using System.Collections.Generic;
using UnityEngine;