Exemplo 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);
            }
        }
Exemplo 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);
            }
        }
Exemplo 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);
            }
        }
Exemplo 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);
            }
        }
Exemplo n.º 5
0
 public abstract void Update(MachineContext machineContext, string selection);
Exemplo n.º 6
0
 public abstract void ExecuteBahavior(MachineContext machineContext, string selection);
Exemplo n.º 7
0
 public override void ExecuteBahavior(MachineContext machineContext, string selection)
 {
     Update(machineContext, selection);
 }
Exemplo n.º 8
0
 public override void Update(MachineContext machine, string selection)
 {
     machine.TransitionToState(machine.RestriegaState);
 }