DESKTOP-5RP3AKU\Jisol c85f350e0a 临时提交
2024-10-17 01:59:25 +08:00

51 lines
1.2 KiB
C#

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<UIScriptDefault>(UIID.Component1);
}
}
}