public virtual void OnFixedUpdate() { if (GlobalStateData != null) { GlobalStateData.OnFixedUpdate(); } if (CurStateData != null) { CurStateData.OnFixedUpdate(); } }
public virtual void SetCurState(TStateData state, bool isManual = true) { if (state == null) { return; } state.BaseStateMachine = this; CurStateData = state; CurStateData.IsManual = isManual; CurStateData.Enter(); }
public virtual void ChangeState(TStateData state, bool isForce = true, bool isManual = true) { if (state == null) { return; } state.BaseStateMachine = this; PreStateData = CurStateData; if (CurStateData != null) { CurStateData.Exit(); } CurStateData = state; CurStateData.IsForce = isForce; CurStateData.IsManual = isManual; CurStateData.Enter(); }