public FSMTransition(FSMCondition condition, FSMAction[] actions = null) { myCondition = condition; if (actions != null) { myActions.AddRange(actions); } }
void Start() { FSMCondition bt = BlueTime; FSMCondition rt = RedTime; FSMTransition t1 = new FSMTransition(bt); FSMTransition t2 = new FSMTransition(rt); FSMState Red = new FSMState(); Red.enterActions.Add(GoRed); FSMState Blue = new FSMState(); Blue.enterActions.Add(GoBlue); Blue.AddTransition(t2, Red); Red.AddTransition(t1, Blue); fsm = new FSM(Red); }
public FSMTransition(FSMCondition condition, FSMAction[] actions = null) { Condition = condition; fireActions = actions; }