Initial commit

This commit is contained in:
ThomasCharester committed 2025-12-12 23:11:01 +03:00
commit 662f4a1d05
89 files changed
+8008

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
namespace Code.StateMachine
{
public abstract class BaseState<TEnum, TStateMachineContext>
{
public abstract TEnum myState { get; }
public delegate void Entered();
public event Entered OnEntered;
public delegate void Exited();
public event Exited OnExited;
protected BaseState(TStateMachineContext context)
{
Context = context;
}
public TStateMachineContext Context { get; protected set; }
public virtual void EnterState() => OnEntered?.Invoke();
public virtual void ExitState() => OnExited?.Invoke();
}
}