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

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

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

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