mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
51 lines
1.2 KiB
C#
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);
|
|
}
|
|
|
|
}
|
|
} |