using UnityEngine;
namespace State
{
///
/// State that drives the engine. OnEnter, OnUpdate, OnFixedUpdate, and OnExit called by parent state machine
///
public class GameState
{
protected Machine StateMachine;
///
/// Called when parent state machine loads this state.
/// Gives a reference to the parent state machine to the state.
///
///
public virtual void OnEnter(Machine machine)
{
StateMachine = machine;
}
// Called when parent StateMachine ChangeState is about to leave this state
public virtual void OnExit() {}
public virtual void OnUpdate(float deltaTime) {}
public virtual void OnFixedUpdate(float deltaTime) {}
}
}