Files
TEngine/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs
2025-07-30 23:08:45 +08:00

47 lines
1.2 KiB
C#

using System.Collections.Generic;
using System.Reflection;
using GameLogic;
#if ENABLE_OBFUZ
using Obfuz;
#endif
using TEngine;
#pragma warning disable CS0436
/// <summary>
/// 游戏App。
/// </summary>
#if ENABLE_OBFUZ
[ObfuzIgnore(ObfuzScope.TypeName | ObfuzScope.MethodName)]
#endif
public partial class GameApp
{
private static List<Assembly> _hotfixAssembly;
/// <summary>
/// 热更域App主入口。
/// </summary>
/// <param name="objects"></param>
public static void Entrance(object[] objects)
{
GameEventHelper.Init();
_hotfixAssembly = (List<Assembly>)objects[0];
Log.Warning("======= 看到此条日志代表你成功运行了热更新代码 =======");
Log.Warning("======= Entrance GameApp =======");
Utility.Unity.AddDestroyListener(Release);
Log.Warning("======= StartGameLogic =======");
StartGameLogic();
}
private static void StartGameLogic()
{
// GameEvent.Get<ILoginUI>().ShowLoginUI();
GameModule.UI.ShowUIAsync<BattleMainUI>();
}
private static void Release()
{
SingletonSystem.Release();
Log.Warning("======= Release GameApp =======");
}
}