|
@@ -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();
|
|
|
}
|
|
|
|