add unity project

add FSM examples
This commit is contained in:
2025-04-09 07:51:22 +02:00
parent 8f18ee3b79
commit fccc1849fe
81 changed files with 7706 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
namespace DefaultNamespace.FSM
{
public interface IState
{
void Enter(IFiniteStateMachine ctx);
// IState Update(); // option 1 next state as return value
void Update(IFiniteStateMachine ctx); // option 2 we call setState when we want to change
void Exit(IFiniteStateMachine ctx);
}
// alternative
// public interface IStateEnter
// {
// void Enter(IFiniteStateMachine ctx);
// }
//
// public interface IStateUpdate
// {
// void Update(IFiniteStateMachine ctx);
// }
//
// public interface IStateExit
// {
// void Exit(IFiniteStateMachine ctx);
// }
}