public override void Update(MachineContext machine, string selection) { if (selection.IsEnjuagando()) { machine.TransitionToState(machine.EnjuagaState); } if (selection.IsApagado()) { machine.TransitionToState(machine.OffState); } }
public override void Update(MachineContext machine, string selection) { if (selection.IsExprimiendoJabon()) { machine.TransitionToState(machine.ExprimeJabonState); } if (selection.Equals(MachineStates.Apagar.ToString())) { machine.TransitionToState(machine.OffState); } }
public override void Update(MachineContext machine, string selection) { if (selection.IsExprimiendoAgua()) { machine.TransitionToState(machine.ExprimeAguaState); } if (selection.IsApagado()) { machine.TransitionToState(machine.OffState); } }
public override void Update(MachineContext machine, string selection) { if (selection.IsLlenandoAgua()) { machine.TransitionToState(machine.LlenarState); } if (selection.IsApagado()) { machine.TransitionToState(machine.OffState); } }
public abstract void Update(MachineContext machineContext, string selection);
public abstract void ExecuteBahavior(MachineContext machineContext, string selection);
public override void ExecuteBahavior(MachineContext machineContext, string selection) { Update(machineContext, selection); }
public override void Update(MachineContext machine, string selection) { machine.TransitionToState(machine.RestriegaState); }