-
Notifications
You must be signed in to change notification settings - Fork 72
/
FF8.cs
330 lines (305 loc) · 8.96 KB
/
FF8.cs
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
using F8Framework.Core;
using F8Framework.F8ExcelDataClass;
namespace F8Framework.Launcher
{
public static class FF8
{
//相当于重命名
/* ------------------------核心模块------------------------ */
// 全局消息
private static MessageManager _message;
// 输入管理-->使用了消息模块
private static InputManager _inputManager;
// 本地存储
private static StorageManager _storage;
// 游戏时间管理-->使用了消息模块
private static TimerManager _timer;
// 流程管理
private static ProcedureManager _procedure;
// 网络管理
private static NetworkManager _networkManager;
// 有限状态机
private static FSMManager _fsm;
// 游戏对象池
private static GameObjectPool _gameObjectPool;
// 资产管理
private static AssetManager _asset;
// 读取配置表-->使用了资产模块
private static F8DataManager _config;
// 音频管理-->使用了资产模块-->使用了游戏对象池模块-->使用了补间动画模块-->使用了时间模块
private static AudioManager _audio;
// 补间动画
private static Tween _tween;
// UI界面管理-->使用了资产模块
private static UIManager _ui;
// 本地化-->使用了配置模块-->使用了资产模块
private static Localization _localization;
// SDK管理-->使用了消息模块
private static SDKManager _sdkManager;
// 下载管理器
private static DownloadManager _downloadManager;
// 日志助手
private static F8LogWriter _logWriter;
/* ------------------------可选模块------------------------ */
// 热更新版本管理-->使用了下载模块-->使用了资产模块
private static HotUpdateManager _hotUpdateManager;
public static MessageManager Message
{
get
{
if (_message == null)
_message = ModuleCenter.CreateModule<MessageManager>();
return _message;
}
set
{
if (_message == null)
_message = value;
}
}
public static InputManager Input
{
get
{
if (_inputManager == null)
_inputManager = ModuleCenter.CreateModule<InputManager>(new DefaultInputHelper());
return _inputManager;
}
set
{
if (_inputManager == null)
_inputManager = value;
}
}
public static StorageManager Storage
{
get
{
if (_storage == null)
_storage = ModuleCenter.CreateModule<StorageManager>();
return _storage;
}
set
{
if (_storage == null)
_storage = value;
}
}
public static TimerManager Timer
{
get
{
if (_timer == null)
_timer = ModuleCenter.CreateModule<TimerManager>();
return _timer;
}
set
{
if (_timer == null)
_timer = value;
}
}
public static ProcedureManager Procedure
{
get
{
if (_procedure == null)
_procedure = ModuleCenter.CreateModule<ProcedureManager>();
return _procedure;
}
set
{
if (_procedure == null)
_procedure = value;
}
}
public static NetworkManager Network
{
get
{
if (_networkManager == null)
_networkManager = ModuleCenter.CreateModule<NetworkManager>();
return _networkManager;
}
set
{
if (_networkManager == null)
_networkManager = value;
}
}
public static FSMManager FSM
{
get
{
if (_fsm == null)
_fsm = ModuleCenter.CreateModule<FSMManager>();
return _fsm;
}
set
{
if (_fsm == null)
_fsm = value;
}
}
public static GameObjectPool GameObjectPool
{
get
{
if (_gameObjectPool == null)
{
_gameObjectPool = ModuleCenter.CreateModule<GameObjectPool>();
ModuleCenter.CreateModule<F8PoolGlobal>();
}
return _gameObjectPool;
}
set
{
if (_gameObjectPool == null)
{
_gameObjectPool = value;
ModuleCenter.CreateModule<F8PoolGlobal>();
}
}
}
public static AssetManager Asset
{
get
{
if (_asset == null)
_asset = ModuleCenter.CreateModule<AssetManager>();
return _asset;
}
set
{
if (_asset == null)
_asset = value;
}
}
public static F8DataManager Config
{
get
{
if (_config == null)
_config = ModuleCenter.CreateModule<F8DataManager>();
return _config;
}
set
{
if (_config == null)
_config = value;
}
}
public static AudioManager Audio
{
get
{
if (_audio == null)
_audio = ModuleCenter.CreateModule<AudioManager>();
return _audio;
}
set
{
if (_audio == null)
_audio = value;
}
}
public static Tween Tween
{
get
{
if (_tween == null)
_tween = ModuleCenter.CreateModule<Tween>();
return _tween;
}
set
{
if (_tween == null)
_tween = value;
}
}
public static UIManager UI
{
get
{
if (_ui == null)
_ui = ModuleCenter.CreateModule<UIManager>();
return _ui;
}
set
{
if (_ui == null)
_ui = value;
}
}
public static Localization Local
{
get
{
if (_localization == null)
_localization = ModuleCenter.CreateModule<Localization>();
return _localization;
}
set
{
if (_localization == null)
_localization = value;
}
}
public static SDKManager SDK
{
get
{
if (_sdkManager == null)
_sdkManager = ModuleCenter.CreateModule<SDKManager>();
return _sdkManager;
}
set
{
if (_sdkManager == null)
_sdkManager = value;
}
}
public static DownloadManager Download
{
get
{
if (_downloadManager == null)
_downloadManager = ModuleCenter.CreateModule<DownloadManager>();
return _downloadManager;
}
set
{
if (_downloadManager == null)
_downloadManager = value;
}
}
public static F8LogWriter LogWriter
{
get
{
if (_logWriter == null)
_logWriter = ModuleCenter.CreateModule<F8LogWriter>();
return _logWriter;
}
set
{
if (_logWriter == null)
_logWriter = value;
}
}
public static HotUpdateManager HotUpdate
{
get
{
if (_hotUpdateManager == null)
_hotUpdateManager = ModuleCenter.CreateModule<HotUpdateManager>();
return _hotUpdateManager;
}
set
{
if (_hotUpdateManager == null)
_hotUpdateManager = value;
}
}
}
}