Skip to content

Commit bedd0ed

Browse files
committed
更新
1 parent 1f53275 commit bedd0ed

File tree

242 files changed

+6053
-4479
lines changed

Some content is hidden

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

242 files changed

+6053
-4479
lines changed

Assets/Script/Core/AnimSystem/AnimSystem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ public static void StopAnim(GameObject animGameObject, bool isCallBack = false)
10261026
{
10271027
GetInstance().animList.Remove(GetInstance().removeList[i]);
10281028
}
1029+
GetInstance().removeList.Clear();
10291030
}
10301031

10311032
/// <summary>
@@ -1097,7 +1098,7 @@ public void Update()
10971098
AnimData animTmp = animList[i];
10981099

10991100
//执行回调
1100-
animTmp.ExecuteCallBack();
1101+
animTmp.ExecuteCallBack();
11011102

11021103
if (!animTmp.AnimReplayLogic())
11031104
{

Assets/Script/Core/Application/ApplicationManager.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ void OnApplicationQuit()
186186
}
187187
}
188188

189-
/*
190-
* 强制暂停时,先 OnApplicationPause,后 OnApplicationFocus
191-
* 重新“启动”游戏时,先OnApplicationFocus,后 OnApplicationPause
192-
*/
193-
void OnApplicationPause(bool pauseStatus)
189+
/*
190+
* 强制暂停时,先 OnApplicationPause,后 OnApplicationFocus
191+
* 重新“启动”游戏时,先OnApplicationFocus,后 OnApplicationPause
192+
*/
193+
void OnApplicationPause(bool pauseStatus)
194194
{
195195
if (s_OnApplicationPause != null)
196196
{
@@ -262,11 +262,11 @@ void SetResourceLoadType()
262262
{
263263
if (UseAssetsBundle)
264264
{
265-
ResourceManager.m_gameLoadType = ResLoadLocation.Streaming;
265+
ResourceManager.LoadType = AssetsLoadType.AssetBundle;
266266
}
267267
else
268268
{
269-
ResourceManager.m_gameLoadType = ResLoadLocation.Resource;
269+
ResourceManager.LoadType = AssetsLoadType.Resources;
270270
}
271271
}
272272

Assets/Script/Core/Application/ApplicationStatusManager.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ private static void EnterStatusLogic(string statusName,bool isFade = true)
7474
try
7575
{
7676
s_currentAppStatus.OnExitStatus();
77-
MemoryManager.FreeMemory();
77+
if (MemoryManager.NeedReleaseMemory())
78+
MemoryManager.FreeMemory();
7879
}
7980
catch (Exception e)
8081
{
@@ -110,18 +111,22 @@ private static void EnterStatusLogic(string statusName,bool isFade = true)
110111
{
111112
if (s_currentAppStatus != null)
112113
{
113-
//Debug.Log("Change ");
114-
115114
UIManager.SetEventSystemEnable(false);
116115
CameraFade.FadeInToOut(s_fadeInTime, s_afterInDelayTime, s_fadeOutTime, () =>
117116
{
118-
//Debug.Log("Change call back ");
119-
120117
UIManager.SetEventSystemEnable(true);
121118
s_currentAppStatus.CloseAllUI(false);
122-
s_currentAppStatus.OnExitStatus();
123119

124-
MemoryManager.FreeMemory();
120+
try
121+
{
122+
s_currentAppStatus.OnExitStatus();
123+
}catch(Exception e)
124+
{
125+
Debug.LogError("OnExitStatus Exception " + statusName + " " + e.ToString());
126+
}
127+
128+
if (MemoryManager.NeedReleaseMemory())
129+
MemoryManager.FreeMemory();
125130

126131
s_currentAppStatusName = statusName;
127132
ApplicationManager.Instance.currentStatus = statusName;

Assets/Script/Core/Application/IApplicationStatus.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public void CloseAllUI(bool isPlayAnim = true)
142142
{
143143
for (int i = 0; i < m_uiList.Count; i++)
144144
{
145+
//Debug.Log("CloseAllUI " + m_uiList[i]);
145146
UIManager.CloseUIWindow(m_uiList[i],isPlayAnim);
146147
}
147148
m_uiList.Clear();

Assets/Script/Core/Audio/AudioManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public static AudioClip GetAudioClip(string soundName)
257257
{
258258
AudioClip clipTmp = null;
259259

260-
clipTmp = AssetsPoolManager.Load<AudioClip>(soundName);
260+
clipTmp = ResourceManager.Load<AudioClip>(soundName);
261261

262262
if (clipTmp == null)
263263
{

Assets/Script/Core/AudioManager/AudioGroupSystem/AudioGroupSystem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ private static void Init()
108108
GameObject obj = new GameObject("[AudioGroupSystem]");
109109
instance = obj.AddComponent<AudioGroupSystem>();
110110

111-
TextAsset asset = AssetsPoolManager.Load<TextAsset>(ConfigName);
111+
TextAsset asset = ResourceManager.Load<TextAsset>(ConfigName);
112112

113113
List<AudioGroupData> datas = JsonUtils.FromJson<List<AudioGroupData>>(asset.text);
114+
ResourceManager.DestoryAssetsCounter(ConfigName);
114115
audioGroupDataDic.Clear();
115116
foreach (var item in datas)
116117
{

Assets/Script/Core/AudioManager/AudioPlayerBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public virtual void SetSFXVolume(float volume)
4343

4444
public AudioClip GetAudioClip(string name)
4545
{
46-
AudioClip red = AssetsPoolManager.Load<AudioClip>(name);
46+
AudioClip red = ResourceManager.Load<AudioClip>(name);
4747
if (red != null)
4848
{
4949
return red;
@@ -92,7 +92,7 @@ public void UnloadClip(AudioAsset asset)
9292
{
9393
string name = asset.assetName;
9494
asset.audioSource.clip = null;
95-
AssetsPoolManager.DestroyByPool(name);
95+
ResourceManager.DestoryAssetsCounter(name);
9696
}
9797
}
9898

Assets/Script/Core/Config/ConfigManager.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static class ConfigManager
2020

2121
public static bool GetIsExistConfig(string ConfigName)
2222
{
23-
return ResourceManager.GetResourceIsExist(ConfigName);
23+
return ResourcesConfigManager.GetIsExitRes(ConfigName);
2424
}
2525

2626
public static Dictionary<string, SingleField> GetData(string ConfigName)
@@ -32,17 +32,21 @@ public static Dictionary<string, SingleField> GetData(string ConfigName)
3232

3333
string dataJson = "";
3434

35+
//#if UNITY_EDITOR
3536
if (!Application.isPlaying)
3637
{
3738
dataJson = ResourceIOTool.ReadStringByResource(
3839
PathTool.GetRelativelyPath(c_directoryName,
3940
ConfigName,
4041
c_expandName));
4142
}
43+
44+
//#else
4245
else
4346
{
44-
dataJson = AssetsPoolManager.ReadTextFile(ConfigName);
47+
dataJson = ResourceManager.LoadText(ConfigName);
4548
}
49+
//#endif
4650

4751

4852
if (dataJson == "")
@@ -65,6 +69,10 @@ public static SingleField GetData(string ConfigName,string key)
6569

6670
public static void CleanCache()
6771
{
72+
foreach (var item in s_configCache.Keys)
73+
{
74+
ResourceManager.DestoryAssetsCounter(item);
75+
}
6876
s_configCache.Clear();
6977
}
7078
}

Assets/Script/Core/Data/DataManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static DataTable GetData(string DataName)
3636

3737
if (Application.isPlaying)
3838
{
39-
dataJson = AssetsPoolManager.ReadTextFile(DataName);
39+
dataJson = ResourceManager.LoadText(DataName);
4040
}
4141
else
4242
{
@@ -67,6 +67,10 @@ public static DataTable GetData(string DataName)
6767
/// </summary>
6868
public static void CleanCache()
6969
{
70+
foreach (var item in s_dataCache.Keys)
71+
{
72+
ResourceManager.DestoryAssetsCounter(item);
73+
}
7074
s_dataCache.Clear();
7175
}
7276
}

Assets/Script/Core/Develop/DevelopReplayManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ static void DevelopHotKeyLogic()
774774
Time.timeScale *= 0.5f;
775775
}
776776

777-
if (Input.GetKeyDown(KeyCode.F12))
777+
if (Input.GetKeyDown(KeyCode.F10))
778778
{
779779
string name = GetScreenshotFileName();
780780
Debug.Log("已保存 屏幕截图 " + name);

0 commit comments

Comments
 (0)