예제 #1
0
            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();
            }
예제 #2
0
            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();
            }