Skip to content

Commit 60fb5e5

Browse files
committed
调整菜单位置,以及许多优化
1 parent 757bfeb commit 60fb5e5

423 files changed

Lines changed: 11268 additions & 4614 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/Script/Core/Application/ApplicationManager.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public void Awake()
8989
//Debug.Log("persistentDataPath:" + Application.persistentDataPath);
9090
instance = this;
9191

92-
GameInfoCollecter.AddAppInfoValue("Build App Mode", m_AppMode);
9392
if (Application.platform != RuntimePlatform.WindowsEditor &&
9493
Application.platform != RuntimePlatform.OSXEditor)
9594
{
@@ -147,7 +146,6 @@ public void AppLaunch()
147146
};
148147

149148
DevelopReplayManager.Init(m_quickLunch); //开发者复盘管理器
150-
151149
LanguageManager.Init();
152150
}
153151
else
@@ -163,6 +161,7 @@ public void AppLaunch()
163161
LanguageManager.Init();
164162
}
165163

164+
166165
if (s_OnApplicationModuleInitEnd != null)
167166
{
168167
s_OnApplicationModuleInitEnd();
@@ -182,6 +181,7 @@ public void AppLaunch()
182181
public static ApplicationVoidCallback s_OnApplicationOnGUI = null;
183182
public static ApplicationVoidCallback s_OnApplicationOnDrawGizmos = null;
184183
public static ApplicationVoidCallback s_OnApplicationLateUpdate = null;
184+
185185

186186
void OnApplicationQuit()
187187
{
@@ -198,11 +198,11 @@ void OnApplicationQuit()
198198
}
199199
}
200200

201-
/*
202-
* 强制暂停时,先 OnApplicationPause,后 OnApplicationFocus
203-
* 重新“启动”游戏时,先OnApplicationFocus,后 OnApplicationPause
204-
*/
205-
void OnApplicationPause(bool pauseStatus)
201+
/*
202+
* 强制暂停时,先 OnApplicationPause,后 OnApplicationFocus
203+
* 重新“启动”游戏时,先OnApplicationFocus,后 OnApplicationPause
204+
*/
205+
void OnApplicationPause(bool pauseStatus)
206206
{
207207
if (s_OnApplicationPause != null)
208208
{
@@ -240,7 +240,7 @@ void Update()
240240

241241
private void LateUpdate()
242242
{
243-
if(s_OnApplicationLateUpdate != null)
243+
if (s_OnApplicationLateUpdate != null)
244244
{
245245
s_OnApplicationLateUpdate();
246246
}
@@ -263,6 +263,10 @@ private void OnDrawGizmos()
263263
if (s_OnApplicationOnDrawGizmos != null)
264264
s_OnApplicationOnDrawGizmos();
265265
}
266+
private void OnDestroy()
267+
{
268+
269+
}
266270

267271
#endregion
268272

@@ -293,7 +297,8 @@ void InitGlobalLogic()
293297
GlobalLogicManager.InitLogic(m_globalLogic[i]);
294298
}
295299
}
296-
#endregion
300+
301+
#endregion
297302
}
298303

299304
public enum AppMode

Assets/Script/Core/PluginTools/UnityRemoteConsole/Server/NetworkCore/NetworkManager/MessageManager.meta renamed to Assets/Script/Core/Application/Boot.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using UnityEngine;
7+
8+
9+
public abstract class AppModuleBase
10+
{
11+
private bool enable = true;
12+
13+
public bool Enable
14+
{
15+
get => enable;
16+
set
17+
{
18+
if (enable && !value)
19+
{
20+
Debug.Log(GetType().Name + " Run OnDisable");
21+
OnDisable();
22+
}
23+
else if (!enable && value)
24+
{
25+
Debug.Log(GetType().Name + " Run OnEnable");
26+
OnEnable();
27+
}
28+
enable = value;
29+
30+
}
31+
}
32+
/// <summary>
33+
/// 模块名
34+
/// </summary>
35+
/// <returns></returns>
36+
public virtual string GetModuleName() { return GetType().Name; }
37+
/// <summary>
38+
/// 模块版本
39+
/// </summary>
40+
/// <returns></returns>
41+
public virtual string GetModuleVersion() { return ""; }
42+
/// <summary>
43+
/// 模块创建时,只运行一次
44+
/// </summary>
45+
public virtual void OnCreate() { }
46+
/// <summary>
47+
/// 模块开始在OnCreate之后,只运行一次
48+
/// </summary>
49+
public virtual void OnStart() { }
50+
/// <summary>
51+
/// 启用时
52+
/// </summary>
53+
public virtual void OnEnable() { }
54+
55+
public virtual void OnUpdate() { }
56+
57+
public virtual void OnFixedUpdate() { }
58+
59+
public virtual void OnLateUpdate() { }
60+
61+
public virtual void OnGUIUpdate() { }
62+
63+
public virtual void OnDisable() { }
64+
/// <summary>
65+
/// 安卓上可能不会调用
66+
/// </summary>
67+
public virtual void OnApplicationQuit() { }
68+
69+
public virtual void OnDrawGizmosUpdate() { }
70+
/// <summary>
71+
/// 当要求模块清理缓存(用于清理内存时)
72+
/// </summary>
73+
public virtual void OnReleaseCache() { }
74+
75+
public virtual void OnApplicationPause(bool pauseStatus)
76+
{
77+
78+
}
79+
80+
public virtual void OnApplicationFocus(bool focusStatus)
81+
{
82+
83+
}
84+
85+
public virtual void OnDestroy()
86+
{
87+
88+
}
89+
}

Assets/Script/Core/PluginTools/UnityRemoteConsole/Server/NetworkCore/NetworkManager/Utils/NetDataWriterExtend.cs.meta renamed to Assets/Script/Core/Application/Boot/AppModuleBase.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/PluginTools/UnityRemoteConsole/Server/NetworkCore/NetworkManager.meta renamed to Assets/Script/Core/Application/Boot/Define.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Reflection;
6+
7+
/// <summary>
8+
/// 脚本变量值
9+
/// </summary>
10+
[System.Serializable]
11+
public class BaseValue
12+
{
13+
14+
/// <summary>
15+
/// 变量名字
16+
/// </summary>
17+
public string name = "";
18+
/// <summary>
19+
/// 类型
20+
/// </summary>
21+
public string typeName = "";
22+
public bool isGeneric = false;
23+
public Type ValueType
24+
{
25+
get
26+
{
27+
if (isGeneric)
28+
{
29+
string[] ss = typeName.Split('|');
30+
Type t = ReflectionUtils.GetTypeByTypeFullName(ss[0]);
31+
Type[] typeArguments = new Type[ss.Length - 1];
32+
for (int i = 1; i < ss.Length; i++)
33+
{
34+
typeArguments[i - 1] = ReflectionUtils.GetTypeByTypeFullName(ss[i]);
35+
}
36+
return t.MakeGenericType(typeArguments);
37+
}
38+
else
39+
return ReflectionUtils.GetTypeByTypeFullName(typeName);
40+
}
41+
}
42+
public string value = "";
43+
44+
private object cacheObje = null;
45+
public BaseValue() { }
46+
public BaseValue(string vName, object vValue)
47+
{
48+
SetValue(vName, vValue);
49+
}
50+
public void SetValue(object vVlaue)
51+
{
52+
SetValue(name, vVlaue);
53+
}
54+
public void SetValue(string vName, object vValue)
55+
{
56+
if (vValue == null)
57+
{
58+
return;
59+
}
60+
cacheObje = vValue;
61+
62+
this.name = vName;
63+
Type type = vValue.GetType();
64+
isGeneric = type.IsGenericType;
65+
if (isGeneric)
66+
{
67+
typeName += type.GetGenericTypeDefinition().FullName + "|";
68+
Type[] typeArguments = type.GetGenericArguments();
69+
for (int i = 0; i < typeArguments.Length; i++)
70+
{
71+
Type t = typeArguments[i];
72+
typeName += t.FullName;
73+
if (i < typeArguments.Length - 1)
74+
typeName += "|";
75+
}
76+
}
77+
else
78+
typeName = type.FullName;
79+
value = JsonUtils.ToJson(vValue);
80+
}
81+
82+
public object GetValue()
83+
{
84+
object obj = null;
85+
if (string.IsNullOrEmpty(typeName) || (string.IsNullOrEmpty(value) && typeName != typeof(string).FullName))
86+
return obj;
87+
if (cacheObje != null)
88+
return cacheObje;
89+
try
90+
{
91+
92+
obj = JsonUtils.FromJson(ValueType, value);
93+
}
94+
catch (Exception e)
95+
{
96+
Debug.LogError("Error name:" + name + " value : " + value + " typeName:" + typeName + "\n" + e);
97+
98+
}
99+
100+
cacheObje = obj;
101+
return obj;
102+
}
103+
public bool EqualTo(BaseValue v)
104+
{
105+
if (v == null) return false;
106+
107+
if (typeName.Equals(v.typeName) && value.Equals(v.value))
108+
return true;
109+
110+
return false;
111+
}
112+
}
113+
114+
115+

Assets/Script/Core/Utils/Json/SimpleJson_Old/SimpleJsonUtil.cs.meta renamed to Assets/Script/Core/Application/Boot/Define/BaseValue.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)