51 lines
2.0 KiB
C#
51 lines
2.0 KiB
C#
using SepCore.BuiltinData;
|
|
using SepCore.DamageText;
|
|
using SepCore.EnemyManager;
|
|
using SepCore.HPBar;
|
|
using SepCore.InputModule.Runtime;
|
|
using SepCore.CameraModule;
|
|
using SepCore.SpriteCache;
|
|
using SepCore.UIRouter;
|
|
using SepCore.Simulation;
|
|
using SepCore.Timer;
|
|
|
|
/// <summary>
|
|
/// 游戏入口。
|
|
/// </summary>
|
|
public partial class GameEntry
|
|
{
|
|
public static BuiltinDataComponent BuiltinData { 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 SimulationWorld SimulationWorld { get; private set; }
|
|
|
|
public static SpriteCacheComponent SpriteCache { 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>();
|
|
HPBar = UnityGameFramework.Runtime.GameEntry.GetComponent<HPBarComponent>();
|
|
DamageText = UnityGameFramework.Runtime.GameEntry.GetComponent<DamageTextComponent>();
|
|
EnemyManager = UnityGameFramework.Runtime.GameEntry.GetComponent<EnemyManagerComponent>();
|
|
SimulationWorld = UnityGameFramework.Runtime.GameEntry.GetComponent<SimulationWorld>();
|
|
SpriteCache = UnityGameFramework.Runtime.GameEntry.GetComponent<SpriteCacheComponent>();
|
|
UIRouter = UnityGameFramework.Runtime.GameEntry.GetComponent<UIRouterComponent>();
|
|
InputModule = UnityGameFramework.Runtime.GameEntry.GetComponent<InputModuleComponent>();
|
|
CameraModule = UnityGameFramework.Runtime.GameEntry.GetComponent<CameraModuleComponent>();
|
|
Timer = UnityGameFramework.Runtime.GameEntry.GetComponent<TimerComponent>();
|
|
}
|
|
}
|