AkiraPixelWind/Assets/Scripts/Main/Procedure/ProcedureScenesLoad.cs
2023-01-05 18:32:58 +08:00

38 lines
1.1 KiB
C#

using Axibug.Fsm;
using Axibug.Procedure;
using Axibug.Runtime;
using Game;
using ProcedureBase = Axibug.Procedure.ProcedureBase;
public class ProcedureScenesLoad : ProcedureBase
{
private bool m_IsLoadSuccessful = false;
//建议一些热更初始化相关的操作丢在这里
protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
{
base.OnEnter(procedureOwner);
Log.Debug("ProcedureScenesLoad::OnEnter");
GamePlayEntry.Map.LoadMap(1);
GamePlayEntry.MainPlayer.InGame = false;
GamePlayEntry.Input.ReSetInput();
GamePlayEntry.MainPlayer.ReSetMainPlayer();
m_IsLoadSuccessful = true;
}
protected override void OnLeave(IFsm<IProcedureManager> procedureOwner, bool isShutdown)
{
base.OnLeave(procedureOwner, isShutdown);
}
protected override void OnUpdate(IFsm<IProcedureManager> procedureOwner, float elapseSeconds, float realElapseSeconds)
{
base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds);
ChangeState<ProcedureInitRole>(procedureOwner);
//TODO
}
}