Esempio n. 1
0
        public override void Update(MachineContext machine, string selection)
        {
            if (selection.IsEnjuagando())
            {
                machine.TransitionToState(machine.EnjuagaState);
            }

            if (selection.IsApagado())
            {
                machine.TransitionToState(machine.OffState);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        public override void Update(MachineContext machine, string selection)
        {
            if (selection.IsExprimiendoAgua())
            {
                machine.TransitionToState(machine.ExprimeAguaState);
            }

            if (selection.IsApagado())
            {
                machine.TransitionToState(machine.OffState);
            }
        }
Esempio n. 4
0
        public override void Update(MachineContext machine, string selection)
        {
            if (selection.IsLlenandoAgua())
            {
                machine.TransitionToState(machine.LlenarState);
            }

            if (selection.IsApagado())
            {
                machine.TransitionToState(machine.OffState);
            }
        }
Esempio n. 5
0
 public abstract void Update(MachineContext machineContext, string selection);
Esempio n. 6
0
 public abstract void ExecuteBahavior(MachineContext machineContext, string selection);
Esempio n. 7
0
 public override void ExecuteBahavior(MachineContext machineContext, string selection)
 {
     Update(machineContext, selection);
 }
Esempio n. 8
0
 public override void Update(MachineContext machine, string selection)
 {
     machine.TransitionToState(machine.RestriegaState);
 }