AkiraPixelWind/Assets/Scripts/Main/Procedure/ProcedureLaunch.cs
2022-12-29 18:20:40 +08:00

32 lines
870 B
C#

using UnityEngine;
using ProcedureOwner = Axibug.Fsm.IFsm<Axibug.Procedure.IProcedureManager>;
namespace Game
{
//游戏入口
public class ProcedureLaunch : ProcedureBase
{
protected override void OnEnter(ProcedureOwner procedureOwner)
{
base.OnEnter(procedureOwner);
//初始化
AppEntry.BuiltinData.InitBuildInfo();
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
Application.targetFrameRate = 60;
#else
Application.targetFrameRate = -1;
#endif
}
protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
{
base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds);
// 运行一帧即切换到 Splash 展示流程
ChangeState<ProcedureSplash>(procedureOwner);
}
}
}