This commit is contained in:
CortexCore
2024-04-16 04:15:21 +08:00
parent 337840ebb3
commit 3ffbaae6c8
26 changed files with 505 additions and 25 deletions

View File

@@ -5,11 +5,14 @@ using System.Linq;
namespace BITKit.StateMachine
{
public abstract partial class StateMachineNode<T> : Node ,IStateMachine<T> where T : class, IState
public abstract partial class StateMachineNode<T> : Node ,IStateMachine<T> where T : class, IState
{
public bool Enabled { get; set; }
public T CurrentState { get; set; }
public event Action<T, T> OnStateChanged;
public event Action<T> OnStateRegistered;
public event Action<T> OnStateUnRegistered;
public IDictionary<Type, T> StateDictionary { get; } = new Dictionary<Type, T>();
public void Initialize()
{