Unity编程设计模式
Devil_MayCare
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Unity学习笔记——设计模式之单例模式
//单例模式 private static GameFacade mfacade = new GameFacade();//初始化对象 public static GameFacade Insance { get { return mfacade; } }//提供共有访问 private GameFacade() { }//new 方法私有化,不供外部访问 GameFacade.Insance.Init();//外部访问方式 ...原创 2020-07-08 16:36:38 · 305 阅读 · 0 评论 -
Unity学习笔记——设计模式之状态模式
通过接口实现两个类通过不同状态的方法调用 具体代码: using UnityEngine; public class StatusDesignMode : MonoBehaviour { // Start is called before the first frame update void Start() { Context context = new Context(); context.SetState(new ConcreteStat原创 2020-07-03 11:16:11 · 265 阅读 · 0 评论
分享