using GFGGame.Launcher; using System.Collections; using UniFramework.Pooling; using UnityEngine; using YooAsset; namespace GFGGame { public class HotUpdateDriver: MonoBehaviour { private void Awake() { //UniFramework // 初始化对象池系统 UniPooling.Initalize(); //Litjson LitJson.UnityTypeBindings.Register(); //ET ETManager.Instance.Init(); //Game OperationSystem.Initialize(); GameController.Start(); Reporter reporter = GameObject.Find("Reporter").GetComponent(); if(LauncherConfig.ChannelId != (int)ChannelID.Test && reporter != null) { reporter.numOfCircleToShow = 50; } } 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(); } } } }