1
This commit is contained in:
@@ -51,10 +51,10 @@ namespace BITKit.StateMachine
|
||||
state.Initialize();
|
||||
StateDictionary.Add(state.GetType(), state);
|
||||
}
|
||||
if (states.Count > 0)
|
||||
{
|
||||
TransitionState(states[0]);
|
||||
}
|
||||
// if (states.Count > 0)
|
||||
// {
|
||||
// TransitionState(states[0]);
|
||||
// }
|
||||
}
|
||||
public void UpdateState(float deltaTime)
|
||||
{
|
||||
@@ -104,9 +104,8 @@ namespace BITKit.StateMachine
|
||||
{
|
||||
BIT4Log.Log<MonoStateMachine<TState>>($"TransitionState from {_currentStateName} to {newState.GetType().Name}");
|
||||
}
|
||||
|
||||
newState.OnStateEntry(oldState);
|
||||
CurrentState = newState;
|
||||
newState.OnStateEntry(oldState);
|
||||
OnStateChanged?.Invoke(oldState, newState);
|
||||
_currentStateName = newState.GetType().Name;
|
||||
newState.Enabled = true;
|
||||
|
Reference in New Issue
Block a user