This commit is contained in:
CortexCore
2023-08-11 23:57:37 +08:00
parent 936a94c84b
commit 75889ec34f
149 changed files with 6524 additions and 1043 deletions

View File

@@ -20,7 +20,7 @@ namespace BITKit.StateMachine
}
[Header(Constant.Header.Components)]
[SerializeReference, SubclassSelector] public List<TState> states = new();
public IDictionary<System.Type, TState> StateDictonary { get; } = new Dictionary<Type, TState>();
public IDictionary<System.Type, TState> StateDictionary { get; } = new Dictionary<Type, TState>();
public IStateMachine<TState> StateMachine => this as IStateMachine<TState>;
TState tempState;
public virtual void OnStart()
@@ -29,7 +29,7 @@ namespace BITKit.StateMachine
{
//state.TransitionState = InternalTransitionState;
state.Initialize();
StateDictonary.Add(state.GetType(), state);
StateDictionary.Add(state.GetType(), state);
}
if (states.Count > 0)
{