随笔分类 -  设计模式

摘要:被观察者 using UnityEngine; // 声明一个委托 public delegate void Tesk(); // 老板 public class Boss : MonoBehaviour { // 创建一个委托 public static Tesk ReleaseTask; voi 阅读全文
posted @ 2022-11-17 23:03 坞中客 阅读(22) 评论(0) 推荐(0) 编辑
摘要:单例模板 public abstract class Singleton<T> where T : new() { private static T instance; public static T Instance { get { if (instance == null) instance = 阅读全文
posted @ 2022-11-17 22:53 坞中客 阅读(34) 评论(0) 推荐(0) 编辑
摘要:单例模板 public class Singleton<T> where T : new() { private static T instance; public static T Instance { get { if (instance == null) instance = new T(); 阅读全文
posted @ 2022-11-17 21:56 坞中客 阅读(26) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示