/// <summary>Changes to the given state</summary> public void GoToState(string state, ActorController actor) { if (!States.ContainsKey(state)) { throw new ArgumentOutOfRangeException(nameof(state), $"Nonexistant order state: {state}"); } OrderStateInfo info = States[state]; currentState = state; currentOrder = info.StartState(actor); }
/// <summary>Changes to the given state</summary> public void GoToState(string state, ActorController actor) { if (States.ContainsKey(state)) { OrderStateInfo info = States[state]; currentState = state; currentOrder = info.StartState(actor); } else { throw new ArgumentOutOfRangeException("Nonexistant order state: " + state); } }