35 lines
722 B
C#
35 lines
722 B
C#
namespace AI.FSM
|
|
{
|
|
public interface IState
|
|
{
|
|
void Enter(IFiniteStateMachine fsm);
|
|
void Update(IFiniteStateMachine fsm);
|
|
void Exit(IFiniteStateMachine fsm);
|
|
}
|
|
|
|
// alternative
|
|
// public interface IStateEnter
|
|
// {
|
|
// void Enter(IFiniteStateMachine fsm);
|
|
// }
|
|
//
|
|
// public interface IStateUpdate
|
|
// {
|
|
// void Update(IFiniteStateMachine fsm);
|
|
// }
|
|
//
|
|
// public interface IStateExit
|
|
// {
|
|
// void Exit(IFiniteStateMachine fsm);
|
|
// }
|
|
|
|
// alternative for state change
|
|
// works, but not ideal
|
|
public enum States
|
|
{
|
|
Idle,
|
|
PlayerDetected,
|
|
PlayerInRange,
|
|
PlayerOutOfRange,
|
|
}
|
|
} |