File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22Unity实现《游戏编程模式》
33
44# 序列模式
5-
6-
7- ## 更新方法
8-
9- ### 定义
10-
11- 通过每次处理一帧的行为模拟一系列独立对象;
12-
13- ### 场景
14-
15- - 你的游戏有很多对象或系统需要同时运行。
16- - 每个对象的行为都与其他的大部分独立。
17- - 对象需要跟着时间进行模拟。
18-
19- ### 案例
20-
21- [ 对象的更新行为] ( ./Assets/SequencingPatterns/UpdateMethod )
22-
23- ### 实现方式
24-
25- * ** 游戏世界** 管理** 对象集合** 。
26-
27- * 每个对象实现一个** 更新方法** 模拟对象在** 一帧** 内的行为。
28-
29- * 每一帧,游戏循环更新集合中的每一个对象。
30-
31- ### 优缺点
32-
33- ** 优点**
34-
35- * 对象行为独立于游戏世界
36-
37- ** 缺点**
38-
39- * 增加系统复杂度
40-
41- ### 与其他设计模式的关系
42-
43- - 这个模式,以及** 游戏循环** 模式和** 组件模式** ,是构建游戏引擎核心的三位一体。
44- - 当你关注在每帧中更新实体或组件的缓存性能时,** 数据局部性模式** 可以让它跑到更快。
45- - [ Unity] ( http://unity3d.com/ ) 框架在多个类中使用了这个模式,包括 [ ` MonoBehaviour ` ] ( http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.Update.html ) 。
46-
475# 行为模式
486## 字节码
497
Original file line number Diff line number Diff line change 1+ ## 更新方法
2+
3+ ### 定义
4+
5+ * 通过每次处理一帧的行为模拟一系列独立对象;
6+
7+ ### 场景
8+
9+ - 你的游戏有很多对象或系统需要同时运行。
10+ - 每个对象的行为都与其他的大部分独立。
11+ - 对象需要跟着时间进行模拟。
12+
13+ ### 案例
14+
15+ [ 对象的更新行为] ( ./Assets/SequencingPatterns/UpdateMethod )
16+
17+ ### 实现方式
18+
19+ * ** 游戏世界** 管理** 对象集合** 。
20+
21+ * 每个对象实现一个** 更新方法** 模拟对象在** 一帧** 内的行为。
22+
23+ * 每一帧,游戏循环更新集合中的每一个对象。
24+
25+ ### 优缺点
26+
27+ ** 优点**
28+
29+ * 对象行为独立于游戏世界
30+
31+ ** 缺点**
32+
33+ * 增加系统复杂度
34+
35+ ### 与其他设计模式的关系
36+
37+ - 这个模式,以及** 游戏循环** 模式和** 组件模式** ,是构建游戏引擎核心的三位一体。
38+ - 当你关注在每帧中更新实体或组件的缓存性能时,** 数据局部性模式** 可以让它跑到更快。
39+ - [ Unity] ( http://unity3d.com/ ) 框架在多个类中使用了这个模式,包括 [ ` MonoBehaviour ` ] ( http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.Update.html ) 。
Original file line number Diff line number Diff line change 1313 - [ 状态模式] ( ./GameProgrammingPatterns/State.md )
1414- 序列模式
1515 - [ 双缓冲模式] ( ./GameProgrammingPatterns/DoubleBuffer.md )
16- - [ 游戏循环] ( ./GameProgrammingPatterns/ )
17- - [ 更新方法] ( ./GameProgrammingPatterns/ )
16+ - 游戏循环
17+ - [ 更新方法] ( ./GameProgrammingPatterns/UpdateMethod.md )
1818- 行为模式
1919 - [ 字节码] ( ./GameProgrammingPatterns/ )
2020 - [ 子类沙箱] ( ./GameProgrammingPatterns/ )
You can’t perform that action at this time.
0 commit comments