AkiraPixelWind/Assets/Scripts/Main/Base/AppEntry.Builtin.cs
2022-12-29 18:20:40 +08:00

75 lines
1.7 KiB
C#

using Axibug.Runtime;
using UnityEngine;
namespace Game
{
/// <summary>
/// 游戏入口。
/// </summary>
public partial class AppEntry : MonoBehaviour
{
/// <summary>
/// 获取游戏基础组件。
/// </summary>
public static BaseComponent Base
{
get;
private set;
}
/// <summary>
/// 获取有限状态机组件。
/// </summary>
public static FsmComponent Fsm
{
get;
private set;
}
/// <summary>
/// 获取流程组件。
/// </summary>
public static ProcedureComponent Procedure
{
get;
private set;
}
/// <summary>
/// 获取事件组件。
/// </summary>
public static EventComponent Event
{
get;
private set;
}
/// <summary>
/// 获取网络组件。
/// </summary>
public static WebRequestComponent WebRequest
{
get;
private set;
}
/// <summary>
/// 对象池组件
/// </summary>
public static ObjectPoolComponent OjbectPool
{
get;
private set;
}
private static void InitBuiltinComponents()
{
Base = GameEntry.GetComponent<BaseComponent>();
Event = GameEntry.GetComponent<EventComponent>();
Procedure = GameEntry.GetComponent<ProcedureComponent>();
Fsm = GameEntry.GetComponent<FsmComponent>();
WebRequest = GameEntry.GetComponent<WebRequestComponent>();
OjbectPool = GameEntry.GetComponent<ObjectPoolComponent>();
}
}
}