public void add(FFStateMachineState newState) { if (!exists(newState.name)) { if(debugMode) Debug.Log("[" + this.name + "][" + newState.name + "][added]"); states.Add(newState); } else { if (debugMode) Debug.Log("[NinjaStateMachine][add][state existente -> " + newState.name + "][omitido]"); } }
public FFStateMachineTransition(string transitionName, FFStateMachineState from, FFStateMachineState to, FFStateMachineStateAction action) { this.name = transitionName; this.from = from; this.to = to; this.action = action; }
// public void add(FFStateMachineState[] statesList) { foreach (FFStateMachineState state in statesList) { this.add(state); } }
public void execute(FFStateMachineState from, FFStateMachineState to) { action(this, from, to); }