/// <summary> /// What happens when the state is exited (i.e. a new state is entered) /// </summary> public virtual void Exit(IStatefulEntity ent) { }
/// <summary> /// What happens when the state is first entered /// </summary> public virtual void Enter(IStatefulEntity ent) { }
/// <summary> /// Something that happens on demand, i.e. whenever this state is executed /// </summary> /// <param name="ent"></param> public virtual void ExecuteStateInstructions(IStatefulEntity ent) { }
public StateMachine(IStatefulEntity owner, IState previousState, IState globalState) { m_Owner = owner; m_PreviousState = previousState; m_GlobalState = globalState; }
public override void Exit(IStatefulEntity ent) { //System.Diagnostics.Debug.WriteLine("Default state exited."); }
public override void ExecuteStateInstructions(IStatefulEntity ent) { //System.Diagnostics.Debug.WriteLine("Executing default state instructions (nothing)."); }