- 博客(2)
- 收藏
- 关注
原创 unity 协程每隔两秒打印一句话
C# 协程每隔两秒打印一句话 将start 改为协程,返回开启打印的协程。这样只会在开始打印一句。把它放到死循环里就可以解决了。 IEnumerator Start() { while (true) { yield return StartCoroutine(PrintTwo(2.0f)); } } IEnumerator PrintTwo(float waitTime) { yi
2020-08-17 00:35:39
1029
原创 Unity单例类
unity中的单例类有两种,继承mono和不继承mono。 不继承mono的。 /// <summary> /// 非继承mono的单例类 /// </summary> /// <typeparam name="T"></typeparam> public class Singleton<T> where T :new() { private static T _instance; public static T GetIn
2020-07-28 23:53:00
378
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人