/// <summary> /// Adds the transition. /// </summary> /// <param name="state">The state.</param> public void AddTransition(SimpleFiniteState <TStateName> state) { ForwardTransitions.Add(state); }
/// <summary> /// Determines whether this instance can transition the specified state. /// </summary> /// <param name="state">The state.</param> /// <returns>True if the transition can occur.</returns> public virtual bool CanTransition(SimpleFiniteState <TStateName> state) { return(ForwardTransitions.Contains(state)); }
/// <summary> /// Adds the reverse transition. /// </summary> /// <param name="state">The state.</param> public void AddReverseTransition(SimpleFiniteState <TStateName> state) { ReverseTransitions.Add(state); }
/// <summary> /// Determines whether this instance can reverse transition to the specified state. /// </summary> /// <param name="state">The state.</param> /// <returns>True if the transition can occur.</returns> public virtual bool CanReverseTransition(SimpleFiniteState <TStateName> state) { return(ReverseTransitions.Contains(state)); }