-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleServer.cs
More file actions
106 lines (88 loc) · 3.46 KB
/
Copy pathModuleServer.cs
File metadata and controls
106 lines (88 loc) · 3.46 KB
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
/**
* @file : ModuleServer.cs
* @brief : 各系统模块逻辑管理
* @details : 新增系统模块需要在这里加入和创建
* @author :
* @date : 2014-9-24
*/
using XLua;
using UnityEngine;
using System.Collections;
namespace SG
{
[Hotfix]
public class ModuleServer : IModuleServer {
private static ModuleServer m_ModuleServer = null;
private static bool bInited = false;
public static ModuleServer MS
{
get
{
if( bInited == false )
{
Init();
}
return m_ModuleServer;
}
}
private static void Init ()
{
m_ModuleServer = new ModuleServer();
bInited = true;
}
bool isDoClassConstructorRegister = false ;
public void Initialize()
{
if (!isDoClassConstructorRegister)
{
GameObject go = new GameObject("ModuleRoot");
GameObject.DontDestroyOnLoad(go);
isDoClassConstructorRegister = true;
DoClassConstructorRegister(go);
InitializeAllModules();
}
}
//新增模块管理器在这里加入
//public BloodMgr GBloodMgr = null;
public SkillCastMgr GSkillCastMgr = null;
//public ShellMgr GShellMgr = null;
//public JiesuanMgr GJiesuanMgr = null;
public DropMgr GDropMgr = null;
public FlyTextManager GFlyTextMgr = null;
public FlyAttrManager GFlyAttrMgr = null;
public DropUIMgr GDropTextMgr = null;
public FixedFlyManager GFixedFlyMgr = null;
//public LoginMgr GLoginMgr = null;
// public ChatMgr GChatMgr = null;
public GmMgr GGmMgr = null;
//新增模块管理器在这里创建
private bool DoClassConstructorRegister(GameObject go)
{
// ClassConstructorRegister BloodMgr_Register = new ClassConstructorRegister(BloodMgr.Newer, go);
// ClassConstructorRegister SkillCastMgr_Register = new ClassConstructorRegister(SkillCastMgr.Newer, go);
// ClassConstructorRegister ShellMgr_Register = new ClassConstructorRegister(ShellMgr.Newer, go);
// ClassConstructorRegister JiesuanMgr_Register = new ClassConstructorRegister(JiesuanMgr.Newer, go);
// ClassConstructorRegister DropMgr_Register = new ClassConstructorRegister(DropMgr.Newer, go);
// ClassConstructorRegister FlyTextMgr_Register = new ClassConstructorRegister(FlyTextManager.Newer, go);
// ClassConstructorRegister DropTextMgr_Register = new ClassConstructorRegister(DropUIMgr.Newer, go);
// ClassConstructorRegister FixedFlyMgr_Register = new ClassConstructorRegister(FixedFlyManager.Newer, go);
//#if !PUBLISH_RELEASE
// ClassConstructorRegister GmMgr_Register = new ClassConstructorRegister(GmMgr.Newer, go);
//#endif
//By XuXiang 去警告
//new ClassConstructorRegister(BloodMgr.Newer, go);
new ClassConstructorRegister(SkillCastMgr.Newer, go);
//new ClassConstructorRegister(ShellMgr.Newer, go);
//new ClassConstructorRegister(JiesuanMgr.Newer, go);
new ClassConstructorRegister(DropMgr.Newer, go);
new ClassConstructorRegister(FlyTextManager.Newer, go);
new ClassConstructorRegister(FlyAttrManager.Newer, go);
new ClassConstructorRegister(DropUIMgr.Newer, go);
new ClassConstructorRegister(FixedFlyManager.Newer, go);
#if !PUBLISH_RELEASE
new ClassConstructorRegister(GmMgr.Newer, go);
#endif
return true;
}
}
};//End SG