2024年2月25日

03 工厂模式

摘要: using UnityEngine; /// <summary> /// 功能说明:简单工厂模式 /// </summary> public class DPFactory:MonoBehaviour { private void Start() { FactoryIPhone8 factoryIP 阅读全文

posted @ 2024-02-25 22:57 莫凡-荒天帝 阅读(1) 评论(0) 推荐(0) 编辑

02 状态模式

摘要: using UnityEngine; /// <summary> /// 功能说明:状态模式 吃睡干例子 /// </summary> public class DPState:MonoBehaviour { private void Start() { Context context = new( 阅读全文

posted @ 2024-02-25 22:56 莫凡-荒天帝 阅读(1) 评论(0) 推荐(0) 编辑

01 单例模式

摘要: using UnityEngine; public class Singleton : MonoBehaviour { ////饿汉式单例 ////private static Singleton _instance = new(); //private static Singleton _inst 阅读全文

posted @ 2024-02-25 22:55 莫凡-荒天帝 阅读(1) 评论(0) 推荐(0) 编辑

导航