guodong 1 سال پیش
والد
کامیت
522e4ce180
20فایلهای تغییر یافته به همراه79 افزوده شده و 197 حذف شده
  1. 6 0
      GameClient/Assets/Editor/ToolsMenu.cs
  2. 0 0
      GameClient/Assets/Game/HotUpdate/Assets.meta
  3. 0 0
      GameClient/Assets/Game/HotUpdate/Assets/AssetReleaser.cs
  4. 0 0
      GameClient/Assets/Game/HotUpdate/Assets/AssetReleaser.cs.meta
  5. 0 0
      GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs
  6. 0 0
      GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs.meta
  7. 67 0
      GameClient/Assets/Game/HotUpdate/ETCodes/ETManager.cs
  8. 1 1
      GameClient/Assets/Game/HotUpdate/ETCodes/ETManager.cs.meta
  9. 0 24
      GameClient/Assets/Game/HotUpdate/ETCodes/HotfixView/AppStart_Init.cs
  10. 0 11
      GameClient/Assets/Game/HotUpdate/ETCodes/HotfixView/AppStart_Init.cs.meta
  11. 0 8
      GameClient/Assets/Game/HotUpdate/ExcelConfig.meta
  12. 0 8
      GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager.meta
  13. 0 10
      GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs
  14. 4 37
      GameClient/Assets/Game/HotUpdate/HotUpdateEntry.cs
  15. 0 7
      GameClient/Assets/Game/Launcher/GameCamera.cs
  16. 0 27
      GameClient/Assets/Game/Launcher/HotUpdateProxy/HotUpdateProxy.cs
  17. 0 11
      GameClient/Assets/Game/Launcher/HotUpdateProxy/HotUpdateProxy.cs.meta
  18. 0 41
      GameClient/Assets/Game/Launcher/HotUpdateProxy/MonoBhaviourProxy.cs
  19. 0 11
      GameClient/Assets/Game/Launcher/HotUpdateProxy/MonoBhaviourProxy.cs.meta
  20. 1 1
      GameClient/Assets/Game/Launcher/LauncherController.cs

+ 6 - 0
GameClient/Assets/Editor/ToolsMenu.cs

@@ -5,6 +5,7 @@ using System.IO;
 using System.Threading;
 using UnityEditor;
 using UnityEditor.Compilation;
+using UnityEngine;
 
 namespace GFGEditor
 {
@@ -353,5 +354,10 @@ namespace GFGEditor
         //    EditorUtility.ClearProgressBar();
         //}
 
+        [MenuItem("Tools/ClearCache")]
+        public static void ClearCache()
+        {
+            PlayerPrefs.DeleteAll();
+        }
     }
 }

+ 0 - 0
GameClient/Assets/Game/HotUpdate/GFGAsset.meta → GameClient/Assets/Game/HotUpdate/Assets.meta


+ 0 - 0
GameClient/Assets/Game/HotUpdate/GFGAsset/AssetReleaser.cs → GameClient/Assets/Game/HotUpdate/Assets/AssetReleaser.cs


+ 0 - 0
GameClient/Assets/Game/HotUpdate/GFGAsset/AssetReleaser.cs.meta → GameClient/Assets/Game/HotUpdate/Assets/AssetReleaser.cs.meta


+ 0 - 0
GameClient/Assets/Game/HotUpdate/GFGAsset/PrefabManager.cs → GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs


+ 0 - 0
GameClient/Assets/Game/HotUpdate/GFGAsset/PrefabManager.cs.meta → GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs.meta


+ 67 - 0
GameClient/Assets/Game/HotUpdate/ETCodes/ETManager.cs

@@ -0,0 +1,67 @@
+using ET;
+using GFGGame.Launcher;
+using System;
+using System.Threading;
+
+namespace GFGGame
+{
+    public class ETManager : SingletonMonoBase<ETManager>
+    {
+
+        public void Init()
+        {
+            AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
+            {
+                Log.Error(e.ExceptionObject.ToString());
+            };
+
+            SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);
+
+
+            ETTask.ExceptionHandler += Log.Error;
+
+            Log.ILog = new UnityLogger();
+
+            Options.Instance = new Options();
+
+            TimeInfo.Instance.TimeZone = 8;
+            try
+            {
+                Game.EventSystem.Add(HotUpdateCodeLoader.Instance.GetTypes());
+
+                Game.Scene.AddComponent<TimerComponent>();
+                Game.Scene.AddComponent<CoroutineLockComponent>();
+                Game.Scene.AddComponent<OpcodeTypeComponent>();
+                Game.Scene.AddComponent<MessageDispatcherComponent>();
+
+                Game.Scene.AddComponent<NetThreadComponent>();
+                Game.Scene.AddComponent<SessionStreamDispatcher>();
+                Game.Scene.AddComponent<ZoneSceneManagerComponent>();
+                Game.Scene.AddComponent<NumericWatcherComponent>();
+
+                GameGlobal.zoneScene = SceneFactory.CreateZoneScene(1, "Game", Game.Scene);
+
+            }
+            catch (Exception e)
+            {
+                Log.Error(e);
+            }
+        }
+
+        private void Update()
+        {
+            Game.Update();
+        }
+
+        private void LateUpdate()
+        {
+            Game.LateUpdate();
+        }
+
+        private void OnApplicationQuit()
+        {
+            //退出进程被杀掉了,暂不执行
+            //Game.Close();
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs.meta → GameClient/Assets/Game/HotUpdate/ETCodes/ETManager.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ac69a4094aeb2d74996978a3a1e61ccc
+guid: 44bd0044a202f884f9a1486d66dde97c
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 0 - 24
GameClient/Assets/Game/HotUpdate/ETCodes/HotfixView/AppStart_Init.cs

@@ -1,24 +0,0 @@
-using GFGGame;
-
-namespace ET
-{
-    public class AppStart_Init: AEvent<EventType.AppStart>
-    {
-        protected override async ETTask Run(EventType.AppStart args)
-        {
-            Game.Scene.AddComponent<TimerComponent>();
-            Game.Scene.AddComponent<CoroutineLockComponent>();
-            Game.Scene.AddComponent<OpcodeTypeComponent>();
-            Game.Scene.AddComponent<MessageDispatcherComponent>();
-            
-            Game.Scene.AddComponent<NetThreadComponent>();
-            Game.Scene.AddComponent<SessionStreamDispatcher>();
-            Game.Scene.AddComponent<ZoneSceneManagerComponent>();
-            Game.Scene.AddComponent<NumericWatcherComponent>();
-
-            GameGlobal.zoneScene = SceneFactory.CreateZoneScene(1, "Game", Game.Scene);
-            //LogServerHelper.SendNodeLog(ReasonEnum.SYS_INIT);
-            await ETTask.CompletedTask;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/ETCodes/HotfixView/AppStart_Init.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 82ebaf318a8468640b49b4722923b5d2
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
GameClient/Assets/Game/HotUpdate/ExcelConfig.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: bd06685c0f9c17e42933bc22b14c60a9
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f27df8c9cb067c948a656202f550affb
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 10
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs

@@ -1,10 +0,0 @@
-using System.Collections.Generic;
-
-namespace GFGGame
-{
-    public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
-    {
-
-
-    }
-}

+ 4 - 37
GameClient/Assets/Game/HotUpdate/HotUpdateEntry.cs

@@ -1,8 +1,4 @@
-using Assets.Game.Launcher.HotUpdateProxy;
-using ET;
-using System;
-using System.Threading;
-using UniFramework.Pooling;
+using UniFramework.Pooling;
 using UnityEngine;
 
 namespace GFGGame.HotUpdate
@@ -19,39 +15,10 @@ namespace GFGGame.HotUpdate
             Reporter reporter = GameObject.Find("Reporter").GetComponent<Reporter>();
             reporter.numOfCircleToShow = 10;
             reporter.isOpen = LauncherConfig.onDebug > 0;
-            //ET
-            System.AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
-            {
-                Log.Error(e.ExceptionObject.ToString());
-            };
-
-            SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);
-
+            //Litjson
             LitJson.UnityTypeBindings.Register();
-
-            ETTask.ExceptionHandler += Log.Error;
-
-            Log.ILog = new UnityLogger();
-
-            Options.Instance = new Options();
-
-            TimeInfo.Instance.TimeZone = 8;
-            try
-            {
-                HotUpdateProxy.Instance.update = Game.Update;
-                HotUpdateProxy.Instance.lateUpdate = Game.LateUpdate;
-                //退出进程被杀掉了,暂不执行
-                //HotUpdateProxy.Instance.onApplicationQuit = Game.Close;
-
-                Game.EventSystem.Add(HotUpdateCodeLoader.Instance.GetTypes());
-
-                Game.EventSystem.Publish(new ET.EventType.AppStart());
-
-            }
-            catch (Exception e)
-            {
-                Log.Error(e);
-            }
+            //ET
+            ETManager.Instance.Init();
             GameController.Start();
         }
 

+ 0 - 7
GameClient/Assets/Game/Launcher/GameCamera.cs

@@ -1,5 +1,3 @@
-using System.Collections;
-using System.Collections.Generic;
 using UnityEngine;
 
 public class GameCamera : MonoBehaviour
@@ -23,9 +21,4 @@ public class GameCamera : MonoBehaviour
         }
     }
 
-    // Update is called once per frame
-    void Update()
-    {
-
-    }
 }

+ 0 - 27
GameClient/Assets/Game/Launcher/HotUpdateProxy/HotUpdateProxy.cs

@@ -1,27 +0,0 @@
-using GFGGame.Launcher;
-using System;
-
-namespace Assets.Game.Launcher.HotUpdateProxy
-{
-    public class HotUpdateProxy : SingletonMonoBase<HotUpdateProxy>
-    {
-        public Action update;
-        public Action lateUpdate;
-        public Action onApplicationQuit;
-
-        void Update()
-        {
-            update?.Invoke();
-        }
-
-        private void LateUpdate()
-        {
-            lateUpdate?.Invoke();
-        }
-
-        private void OnApplicationQuit()
-        {
-            onApplicationQuit?.Invoke();
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/Launcher/HotUpdateProxy/HotUpdateProxy.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ef0977672ac816346a41c51d6ba6aaad
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 41
GameClient/Assets/Game/Launcher/HotUpdateProxy/MonoBhaviourProxy.cs

@@ -1,41 +0,0 @@
-using System.Collections;
-using UnityEngine;
-using System;
-
-namespace GFGGame
-{
-    public class MonoBhaviourProxy : MonoBehaviour
-    {
-        public Action start;
-        public Action update;
-        public Action onDestroy;
-        public Action onEnable;
-        public Action onDisable;
-
-        private void OnDestroy()
-        {
-            onDestroy?.Invoke();
-        }
-
-        // Use this for initialization
-        void Start()
-        {
-            start?.Invoke();
-        }
-
-        // Update is called once per frame
-        void Update()
-        {
-            update?.Invoke();
-        }
-        private void OnEnable()
-        {
-            onEnable?.Invoke();
-        }
-
-        private void OnDisable()
-        {
-            onDisable?.Invoke();
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/Launcher/HotUpdateProxy/MonoBhaviourProxy.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 649dc59ec70e8af489fa0f1f2d6c5ab1
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
GameClient/Assets/Game/Launcher/LauncherController.cs

@@ -31,7 +31,6 @@ namespace GFGGame
             else
             {
                 LauncherAgreeView.Instance.Open(() => {
-                    InitBugly();
                     onSuccess?.Invoke();
                 });
             }
@@ -39,6 +38,7 @@ namespace GFGGame
 
         public static void CheckGameStatus()
         {
+            InitBugly();
             if (LauncherConfig.serverStatus == 1)
             {
                 Alert.Show("游戏正在维护中,请稍后再试。")