State Manager now calls activate on the initial state.

This commit is contained in:
Harrison Deng 2020-07-10 23:48:50 -05:00
parent 1f8bc5fb61
commit f339a33d3e

View File

@ -35,8 +35,9 @@ namespace SlatedGameToolkit.Framework.StateSystem
if (initialState == null) throw new ArgumentNullException("initialState");
Logger.Log("Initialized state manager with state: " + initialState.getName());
thread = Thread.CurrentThread;
currentState = initialState;
AddState(initialState);
currentState = initialState;
currentState.Activate();
}
internal void Update(double timeStep) {