// Use this for initialization void Start() { p = new FSM.Process(); p.CurrentState = EIdle; p.transitions = new Dictionary <FSM.Transition, int> { { new FSM.Transition(EIdle, SClickUp), EShowingCreateMenu }, { new FSM.Transition(EShowingCreateMenu, SClickOutside), EIdle }, //{ new StateTransition(ProcessState.Active, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Active, Command.Pause), ProcessState.Paused }, //{ new StateTransition(ProcessState.Paused, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Paused, Command.Resume), ProcessState.Active } }; }
// Use this for initialization void Start() { pc = PlayerController.GetPlayerController(); fsmProcess = new FSM.Process(); fsmProcess.CurrentState = StateIdle; fsmProcess.transitions = new Dictionary <FSM.Transition, int> { { new FSM.Transition(StateIdle, TransitionStarted), StateStartingLevel }, { new FSM.Transition(StateIdle, TransitionNoBaseYet), StateSelectBaseLocation }, { new FSM.Transition(StateSelectBaseLocation, TransitionBaseSelected), StateStartingLevel }, { new FSM.Transition(StateStartingLevel, TransitionLevelReady), StatePlaying }, { new FSM.Transition(StatePlaying, TransitionBaseDestroyed), StateLose }, { new FSM.Transition(StatePlaying, TransitionAllEnemiesDestroyed), StateWin }, //{ new StateTransition(ProcessState.Active, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Active, Command.Pause), ProcessState.Paused }, //{ new StateTransition(ProcessState.Paused, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Paused, Command.Resume), ProcessState.Active } }; }
void Start() { fsmProcess = new FSM.Process(); fsmProcess.CurrentState = StateWaitToStart; fsmProcess.transitions = new Dictionary <FSM.Transition, int> { { new FSM.Transition(StateWaitToStart, TransitionLevelReady), StateIdle }, { new FSM.Transition(StateIdle, TransitionClickUp), StateShowingCreateMenu }, { new FSM.Transition(StateIdle, TransitionDownMoving), StateDrag }, { new FSM.Transition(StateDrag, TransitionUp), StateClear }, { new FSM.Transition(StateShowingCreateMenu, TransitionClickOutside), StateClear }, { new FSM.Transition(StateShowingCreateMenu, TransitionCreateTower), StateClear }, { new FSM.Transition(StateClear, TransitionFinished), StateIdle }, //{ new StateTransition(ProcessState.Active, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Active, Command.Pause), ProcessState.Paused }, //{ new StateTransition(ProcessState.Paused, Command.End), ProcessState.Inactive }, //{ new StateTransition(ProcessState.Paused, Command.Resume), ProcessState.Active } }; CreateTowersMenuCanvas.enabled = (false); }