using BX; using UnityEngine; /// /// 主入口 /// public class Main : MonoBehaviour { private void Awake() { Init(); } /// /// 初始化 /// private void Init() { BXSdk.Instance.LogEvent("App_Launch"); Application.targetFrameRate = 60; BXSdk.Instance.InitSdk(); ConfigManager.Instance.Init(); UserDataManager.Instance.Init(); YooAssetManager.Instance.Init(PackagesName.GameData, DownLoad, Successful, FailCall); Scenes.Instance.SetGameState(E_GameState.Start); UIManager.Instance.ResourcesShowUI((ui) => { ui.SetAction(() => { BXSdk.Instance.LogEvent("Loading_Start"); if (!UserDataManager.Instance.userData.guidance.isOverInitialEntry) { GuidanceManger.Instance.Init(); } }, () => { BXSdk.Instance.LogEvent("Loading_End", new System.Collections.Generic.Dictionary() { {"Time",Time.time} }); Scenes.Instance.hallScene.SkipInit(); }); }); } private void DownLoad(float progress, string currentSizeMB, string totalSizeMB) { } private void Successful() { ScenesLoadManager.Instance.AsynLoadScene(MyConstant.HallScene, () => { UIManager.Instance.GetUI().Load(); }); } private void FailCall() { } }