Exemplo n.º 1
0
 /// <summary>
 /// You can call DoTransition to transition your state to another state
 /// 'nextState' should be a sibling state of the current state, ie in the statemachine definition,
 /// the nextState and this state are children of the same parent.
 /// </summary>
 /// <param name="nextState"> The state you need to transition to. This should a sibling of the current state,
 /// ie in the statemachine definition, the current state nextState are children of the same parent.</param>
 /// <param name="args"> These arguments will be used to choose which constructor of the next state will be called.</param>
 /// <returns> Returns if the transition was successful or not.</returns>
 public bool DoTransition(System.Type nextState, object[] args = null)
 {
     Debug.Assert(m_OwnerLogic != null, "Cannot do transition before state has been entered.");
     return(m_OwnerLogic.DoTransition(nextState, args));
 }