using UniFramework.Pooling; using UnityEngine; namespace GFGGame { public class HotUpdateDriver: MonoBehaviour { private void Awake() { //UniFramework // 初始化对象池系统 Debug.Log("进入HotUpdateDriver"); UniPooling.Initalize(); //Litjson Debug.Log("UnityTypeBindings.Register"); LitJson.UnityTypeBindings.Register(); //ET Debug.Log("ET"); ETManager.Instance.Init(); //Game Debug.Log("OperationSystem"); OperationSystem.Initialize(); Debug.Log("GameController.Start"); GameController.Start(); Reporter reporter = GameObject.Find("Reporter").GetComponent(); if ((LauncherConfig.ChannelId != (int)ChannelID.Test) && reporter != null) { reporter.numOfCircleToShow = 5; } } private void Update() { OperationSystem.Update(); CheckExitAlert(); } private void OnDestroy() { OperationSystem.DestroyAll(); } private void OnApplicationQuit() { SQLiteHelper.Instance.CloseConnection(true); } private void CheckExitAlert() { if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.Home)) { QDManager.Exit(); } } private void OnApplicationPause(bool pause) { if(pause) { GameGlobal.pauseTime = ET.TimeHelper.ClientNowSeconds(); } } } }