unity中Invoke()使用

Invoke(「方法名」,間隔時間)//每隔多少時間執行一次某方法函數 InvokeRepeating("printMessage",2f,3f);//2s後調用一次每隔3三調用一次 date 因此說寫在void start()函數裏的InvokeRepeating("printMessage",2f,3f);方法和寫在void update()的Invoke()方法效果可能同樣方法
相關文章
相關標籤/搜索