Files
vampire-like/Assets/GameMain/Scripts/Runtime/Base/GameEntry.Custom.cs
T
2026-09-18 21:43:22 +08:00

51 lines
2.0 KiB
C#

using SepCore.BuiltinData;
using SepCore.CustomComponent;
using SepCore.DamageText;
using SepCore.EnemyManager;
using SepCore.HPBar;
using SepCore.InputModule.Runtime;
using SepCore.CameraModule;
using SepCore.UIRouter;
using SepCore.Simulation;
using SepCore.Timer;
/// <summary>
/// 游戏入口。
/// </summary>
public partial class GameEntry
{
public static BuiltinDataComponent BuiltinData { get; private set; }
public static LubanComponent Luban { get; private set; }
public static HPBarComponent HPBar { get; private set; }
public static DamageTextComponent DamageText { get; private set; }
public static EnemyManagerComponent EnemyManager { get; private set; }
public static ISimulationWorld SimulationWorld { get; private set; }
public static UIRouterComponent UIRouter { get; private set; }
public static InputModuleComponent InputModule { get; private set; }
public static CameraModuleComponent CameraModule { get; private set; }
public static TimerComponent Timer { get; private set; }
private static void InitCustomComponents()
{
BuiltinData = UnityGameFramework.Runtime.GameEntry.GetComponent<BuiltinDataComponent>();
Luban = UnityGameFramework.Runtime.GameEntry.GetComponent<LubanComponent>();
HPBar = UnityGameFramework.Runtime.GameEntry.GetComponent<HPBarComponent>();
DamageText = UnityGameFramework.Runtime.GameEntry.GetComponent<DamageTextComponent>();
EnemyManager = UnityGameFramework.Runtime.GameEntry.GetComponent<EnemyManagerComponent>();
SimulationWorld = UnityGameFramework.Runtime.GameEntry.GetComponent<SimulationWorld>();
UIRouter = UnityGameFramework.Runtime.GameEntry.GetComponent<UIRouterComponent>();
InputModule = UnityGameFramework.Runtime.GameEntry.GetComponent<InputModuleComponent>();
CameraModule = UnityGameFramework.Runtime.GameEntry.GetComponent<CameraModuleComponent>();
Timer = UnityGameFramework.Runtime.GameEntry.GetComponent<TimerComponent>();
}
}