public void ChangeState <T>() where T : IFsmState, new() { _currentEvent?.Exit(); _currentEvent = new T(); _currentEvent.Start(); }
public void ChangeState(IFsmState newState) { _currentEvent?.Exit(); _currentEvent = newState; _currentEvent.Start(); }