public void LogTransition(FsmState fromState, FsmTransition transition) { FsmLogEntry fsmLogEntry = NewFsmLogEntry(FsmLogType.Transition); fsmLogEntry.State = fromState; fsmLogEntry.Transition = transition; AddEntry(fsmLogEntry); }
public int GetTransitionIndex(FsmTransition transition) { if (transition == null) { return(-1); } for (int i = 0; i < transitions.Length; i++) { FsmTransition fsmTransition = transitions[i]; if (fsmTransition == transition) { return(i); } } return(-1); }
public FsmState(FsmState source) { fsm = source.Fsm; name = source.Name; description = source.description; colorIndex = source.colorIndex; position = new Rect(source.position); hideUnused = source.hideUnused; isBreakpoint = source.isBreakpoint; isSequence = source.isSequence; transitions = new FsmTransition[source.transitions.Length]; for (int i = 0; i < source.Transitions.Length; i++) { transitions[i] = new FsmTransition(source.Transitions[i]); } actionData = source.actionData.Copy(); }