Skip to content

Commit 2cda95f

Browse files
committed
update README
1 parent 195eb0a commit 2cda95f

19 files changed

+39
-2
lines changed

GameProgrammingPatterns/Bytecode.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 字节码
22

3+
[代码示例](.\Assets\BehavioralPatterns\Bytecode)
4+
35
### 定义
46

57
将行为编码为虚拟机器上的指令,赋予其数据的灵活性
@@ -42,4 +44,5 @@
4244

4345
事实上,最终你两种模式**会使用。你用来构造字节码的工具会有内部的对象树。这也是**解释器模式**所能做的。
4446

45-
为了编译到字节码,你需要递归回溯整棵树,就像用**解释器模式**去解释它一样。 *唯一的* 不同在于,**不是立即执行一段行为**,而是生成整个字节码再执行。
47+
为了编译到字节码,你需要递归回溯整棵树,就像用**解释器模式**去解释它一样。 *唯一的* 不同在于,**不是立即执行一段行为**,而是生成整个字节码再执行。
48+

GameProgrammingPatterns/Command.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## 命令模式
1+
## 命令模式
2+
3+
[代码示例](.\Assets\DesignPatternsRevisited\CommandPattern)
24

35
### 定义
46

GameProgrammingPatterns/Component.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 组件模式
22

3+
[代码示例](.\Assets\DecouplingPatterns\Component)
4+
35
### 定义
46

57
允许一个单一的实体跨越多个不同域而不会导致耦合。

GameProgrammingPatterns/DataLocality.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 数据局部性
22

3+
[代码示例](.\Assets\OptimizationPatterns\DataLocality)
4+
35
### 定义
46

57
合理组织数据,充分使用CPU的缓存来加速内存读取

GameProgrammingPatterns/DirtyFlag.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 脏标识模式
22

3+
[代码示例](.\Assets\OptimizationPatterns\DirtyFlag)
4+
35
### 定义
46

57
将工作延期至需要其结果时才去执行,避免不必要的工作

GameProgrammingPatterns/DoubleBuffer.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 双缓冲模式
22

3+
[代码示例](.\Assets\SequencingPatterns\DoubleBuffer)
4+
35
### 定义
46

57
用序列的操作模拟瞬间或者同时发生的事情

GameProgrammingPatterns/EventQueue.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 事件队列
22

3+
[代码示例](.\Assets\DecouplingPatterns\EventQueue)
4+
35
### 定义
46

57
事件队列在队列中按先入先出的顺序存储一系列通知或请求。 发送通知时,将请求放入队列并返回。 处理请求的系统之后稍晚从队列中获取请求并处理。 这解耦了发送者和接收者,既静态又及时。

GameProgrammingPatterns/Flyweight.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 享元模式
22

3+
[代码示例](.\Assets\DesignPatternsRevisited\FlyweightPattern)
4+
35
### 定义
46

57
摒弃了在每个对象中保存所有数据的方式, 通过**共享**多个对象所共有的相同状态, 让你能在有限的内存容量中**载入更多对象**

GameProgrammingPatterns/ObjectPool.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 对象池模式
22

3+
[代码示例](.\Assets\OptimizationPatterns\ObjectPool)
4+
35
### 定义
46

57
放弃单独地分配和释放对象,从固定的池中重用对象,以提高性能和内存使用率

GameProgrammingPatterns/Observer.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 观察者模式
22

3+
[代码示例](.\Assets\DesignPatternsRevisited\ObserverPattern)
4+
35
### 定义
46

57
允许你定义一种订阅机制, 可在对象事件发生时通知多个 “观察” 该对象的其他对象。

GameProgrammingPatterns/Prototype.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 原型模式
22

3+
[代码示例](.\Assets\DesignPatternsRevisited\PrototypePattern)
4+
35
### 定义
46

57
使用特定原型实例来创建特定种类的对象,并且通过**拷贝**原型来创建新的对象

GameProgrammingPatterns/ServiceLocator.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 服务定位器
22

3+
[代码示例](.\Assets\DecouplingPatterns\ServiceLocator)
4+
35
### 定义
46

57
提供服务的全局接入点,避免使用者和实现服务的具体类耦合。

GameProgrammingPatterns/Singleton.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 单例模式
22

3+
[代码示例](.\Assets\DesignPatternsRevisited\SingletonPattern)
4+
35
### 定义
46

57
确保一个类只有一个实例,并为其提供一个全局访问入口

GameProgrammingPatterns/SpatialPartition.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 空间分区
22

3+
[代码示例](.\Assets\OptimizationPatterns\DataLocality)
4+
35
### 定义
46

57
将对象根据它们的位置存储在数据结构中,来高效地定位对象

GameProgrammingPatterns/State.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 状态模式
22

3+
[代码示例](.\Assets\DesignPatternsRevisited\StatePattern)
4+
35
### 定义
46

57
能在一个对象的内部状态变化时改变其行为, 使其看上去就像改变了自身所属的类一样。

GameProgrammingPatterns/SubclassSandbox.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 子类沙箱
22

3+
[代码示例](.\Assets\BehavioralPatterns\SubclassSandbox)
4+
35
### 定义
46

57
用一系列由基类提供的操作定义子类中的行为。

GameProgrammingPatterns/TypeObject.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 类型对象
22

3+
[代码示例](.\Assets\BehavioralPatterns\TypeObject)
4+
35
### 定义
46

57
创造一个类A来允许灵活地创造新“类型”,类A的每个实例都代表了不同的对象类型。

GameProgrammingPatterns/UpdateMethod.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 更新方法
22

3+
[代码示例](.\Assets\SequencingPatterns\UpdateMethod)
4+
35
### 定义
46

57
* 通过每次处理一帧的行为模拟一系列独立对象;
File renamed without changes.

0 commit comments

Comments
 (0)