override public void beginState(Barrel barrel) { barrel.openValve(barrel.supplyValve); barrel.openValve(barrel.tankValve); barrel.closeValve(barrel.shotValve); barrel.readyToShoot = false; timer.reset(); timer.start(); }
override public void beginState(Barrel barrel) { // keep the tank valve open so the piston does not move barrel.closeValve(barrel.supplyValve); barrel.openValve(barrel.tankValve); barrel.closeValve(barrel.shotValve); barrel.shotRequested = false; barrel.readyToShoot = true; timer.reset(); timer.start(); }