mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 08:36:22 +00:00
提交
This commit is contained in:
51
JNFrame2/临时存储/GameScripts/HotGameMain.cs
Normal file
51
JNFrame2/临时存储/GameScripts/HotGameMain.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user