执行流程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
+-------------------------+
|clean realtime data(new) |
game start | |
|load or create db |
new or load |load config |
|convert config to db |
| |
+----------+--------------+
|
|
+----------v--------------+ +------------------+
| create backgroud | | sa^e background |
+-------------------------> create player (camera) | | save player |
| | create building +------> save building |
| load or create board | create items | | save items |
| | create monster | | save monster |
| | create i/o point | | save i/o point |
| | | +------------------+
| +----------+--------------+
| |
| |
| +----------v--------------+
| +------------------> input active |
| | | input |
| | +----------+--------------+
| | |
| | +-----------v---------------+
| | | input close | +------------------------+
| | | +----------------------+ | | save player |
| | | |check player condition| | | monster if change save |
| | turn base | |player behaviour | +------> item if change save |
| | | | | | | |
| | | +----------------------+ | +------------------------+
| | | +-----------------------+ |
| | | |check monster condition| | +-------------------------+
| | | |monster behaviour | | | player upgrade |
| | | | | +------> active and save achieved|
| | | +-----------------------+ | | |
| | | | +-------------------------+
| | +-------+----+----------+---+
| | | | |
| | | | |
| +-------------------------+ | |
| | |
| +-----------v--------+ |
+-------------------------+ into i/o point | |
+--------------------+ |
|
+----------------------v---+
|game over or final stage |
| |
+-----------+--------------+
|
+-----------v--------------+
| clean runtime data |
| save achieved |
| |
| |
+--------------------------+

gameStart

内存 静态数据 冷数据 热数据 说明
SpriteList 储存所有的精灵图片
FileList 格式为XDocment,储存runtime需要的冷数据
RuntimeData 加载配置文件,储存runtime的热数据
Holder 用于方便文件管理

FileList 分为background和interactive,区分的逻辑为不可交互对象,可交互对象。
interactive 包括:

  1. doorPos
  2. floorPos
  3. bornPoint
  4. intoPoint
  5. exitPoint
  6. bossPoint
  7. candlesPoint
  8. treasureRarePoint
  9. treasureRandomPoint
  10. HpPoint
  11. shopPoint
  12. carpetRect