示例#1
0
 public void Execute(Sign signBlock, InputState currentInputs, InputState previousInputs) {
   boolean inputA = currentInputs.isInputOneHigh();
   boolean inputB = currentInputs.isInputTwoHigh();
   boolean inputC = currentInputs.isInputThreeHigh();
   if (inputA && !inputB && !inputC) {
     this.switchLever(Lever.BACK, signBlock, true, 3);
     this.switchLever(Lever.LEFT, signBlock, false, 2);
     this.switchLever(Lever.RIGHT, signBlock, false, 2);
   } else if (!inputA && inputB && !inputC) {
     this.switchLever(Lever.BACK, signBlock, false, 3);
     this.switchLever(Lever.LEFT, signBlock, true, 2);
     this.switchLever(Lever.RIGHT, signBlock, false, 2);
   } else if (!inputA && !inputB && inputC) {
     this.switchLever(Lever.BACK, signBlock, false, 3);
     this.switchLever(Lever.LEFT, signBlock, false, 2);
     this.switchLever(Lever.RIGHT, signBlock, true, 2);
   } else {
     this.switchLever(Lever.BACK, signBlock, false, 3);
     this.switchLever(Lever.LEFT, signBlock, false, 2);
     this.switchLever(Lever.RIGHT, signBlock, false, 2);
   }
 }