using System; // using HotScripts.GameLauncher; using HotScripts.GameScripts.FGui; using HotScripts.GameScripts.FGui.Scripts; using JNGame.Runtime; using JNGame; using SHFrame; using UnityEngine; using EventArgs = SHFrame.EventArgs; namespace HotScripts.GameScripts { public class HotGameMain : MonoBehaviour { private async void Awake() { AddListener(); //初始化系统 await JNetGame.Instance.Init(App.AllSystem()); // //初始化成功 // App.EventLauncher.DispatchEvent(HotLauncherEvent.InitSuccess); } private void OnDestroy() { RemoveListener(); } private void AddListener() { // App.EventLauncher.AddListener(HotLauncherEvent.GoGameMain,OnGoGameMain); } private void RemoveListener() { // App.EventLauncher.RemoveListener(HotLauncherEvent.GoGameMain,OnGoGameMain); } private async void OnGoGameMain(EventArgs eventargs) { Log.Debug($"进入游戏"); await App.UI.Open(UIID.Component1); } } }