This repository is about patterns in 《game programming patterns》 implemented in Unity with C#. The main purpose of this repository is to help understand the patterns.
本repo主要为《游戏编程模式》一书中介绍的多种设计模式,在Unity引擎中用C#脚本实现一遍,以增强自己的理解。
主要用于描述类或者对象怎样交互和怎样给分配职责。
- Command Pattern 命令模式
- Observer Pattern 观察者模式
- State Pattern 状态模式
主要用于创建对象。
-
Abstract Factory Pattern 抽象工厂模式
-
Factory Method Pattern 工厂方法模式
-
Prototype Pattern 原型模式
-
Singleton Pattern 单例模式
主要用于处理类或对象的组合。
- Flyweight Pattern 享元模式