示例#1
0
 public void ChangeState <T>() where T : IFsmState, new()
 {
     _currentEvent?.Exit();
     _currentEvent = new T();
     _currentEvent.Start();
 }
示例#2
0
 public void ChangeState(IFsmState newState)
 {
     _currentEvent?.Exit();
     _currentEvent = newState;
     _currentEvent.Start();
 }