Examples of Aero


Examples of megamek.common.Aero

                // it also must be same heading and velocity
                if ((other instanceof Aero) && !((Aero) other).isOutControlTotal() && other.isDone() && other.canLoad(ce) && ce.isLoadableThisTurn() && (cmd.getFinalFacing() == other.getFacing())) {

                    // now lets check velocity
                    // depends on movement rules
                    Aero oa = (Aero) other;
                    if (client.game.useVectorMove()) {
                        if (Compute.sameVectors(cmd.getFinalVectors(), oa.getVectors())) {
                            choices.add(other.getId());
                        }
                    } else if (cmd.getFinalVelocity() == oa.getCurrentVelocity()) {
                        choices.add(other.getId());
                    }
                }
            }
            // Nope. Discard it.
View Full Code Here

Examples of megamek.common.Aero

                // it also must be same heading and velocity
                if ((other instanceof Aero) && !((Aero) other).isOutControlTotal() && other.isDone() && other.canLoad(ce) && ce.isLoadableThisTurn() && (cmd.getFinalFacing() == other.getFacing())) {

                    // now lets check velocity
                    // depends on movement rules
                    Aero oa = (Aero) other;
                    if (client.game.useVectorMove()) {
                        if (Compute.sameVectors(cmd.getFinalVectors(), oa.getVectors())) {
                            choices.add(other.getId());
                        }
                    } else if (cmd.getFinalVelocity() == oa.getCurrentVelocity()) {
                        choices.add(other.getId());
                    }
                }
            }
            // Nope. Discard it.
View Full Code Here

Examples of megamek.common.Aero

        if (!(ce instanceof Aero)) {
            return;
        }

        Aero a = (Aero) ce;

        if (a.isOutControlTotal()) {
            disableButtons();
            butDone.setEnabled(true);
            butNext.setEnabled(true);
            butLaunch.setEnabled(true);
        }
View Full Code Here

Examples of megamek.common.Aero

        if (!(ce instanceof Aero)) {
            return;
        }

        Aero a = (Aero) ce;
        if (a.getFuel() < 1) {
            disableButtons();
            butDone.setEnabled(true);
            butNext.setEnabled(true);
            butLaunch.setEnabled(true);
            updateRACButton();
View Full Code Here

Examples of megamek.common.Aero

        if (!(ce instanceof Aero)) {
            return;
        }

        Aero a = (Aero) ce;
        if (client.game.getBoard().inAtmosphere()) {
            if (a.isSpheroid() || client.game.getPlanetaryConditions().isVacuum()) {
                butAcc.setEnabled(false);
                butDec.setEnabled(false);
                butAccN.setEnabled(false);
                butDecN.setEnabled(false);
            }
View Full Code Here

Examples of megamek.common.Aero

    private void dumpBombs() {

        if (!(ce() instanceof Aero)) {
            return;
        }
        Aero a = (Aero) ce();
        int overallMoveType = IEntityMovementType.MOVE_NONE;
        if(null != cmd) {
            overallMoveType = cmd.getLastStepMovementType();
        }

        // bring up dialog to dump bombs, then make a control roll and report
        // success or failure
        // should update mp available
        BombPayloadDialog dumpBombsDialog = new BombPayloadDialog(clientgui.frame, Messages.getString("MovementDisplay.BombDumpDialog.title"), //$NON-NLS-1$
                a.getBombChoices(), false, true);
        dumpBombsDialog.setVisible(true);
        if (dumpBombsDialog.getAnswer()) {
            /*
            int[] bombsDumped = dumpBombsDialog.getChoices();
            // first make a control roll
View Full Code Here

Examples of megamek.common.Aero

            return false;
        case (ManeuverType.MAN_VIFF):
            if (!(ce() instanceof Aero)) {
                return false;
            }
            Aero a = (Aero) ce();
            MoveStep last = cmd.getLastStep();
            int vel = a.getCurrentVelocity();
            if (null != last) {
                vel = last.getVelocityLeft();
            }
            while (vel > 0) {
                cmd.addStep(MovePath.STEP_DEC, true, true);
View Full Code Here

Examples of megamek.common.Aero

            cmd.addStep(MovePath.STEP_HOVER);
            clientgui.bv.drawMovementData(ce, cmd);
        } else if (ev.getActionCommand().equals(MOVE_MANEUVER)) {
            ManeuverChoiceDialog choiceDialog = new ManeuverChoiceDialog(clientgui.frame, Messages.getString("MovementDisplay.ManeuverDialog.title"), //$NON-NLS-1$
                    "huh?");
            Aero a = (Aero) ce;
            MoveStep last = cmd.getLastStep();
            int vel = a.getCurrentVelocity();
            int elev = a.getElevation();
            Coords pos = a.getPosition();
            int distance = 0;
            if (null != last) {
                vel = last.getVelocityLeft();
                elev = last.getElevation();
                pos = last.getPosition();
                distance = last.getDistance();
            }
            int ceil = client.game.getBoard().getHex(pos).ceiling();
            choiceDialog.checkPerformability(vel, elev, ceil, a.isVSTOL(), distance);
            choiceDialog.setVisible(true);
            int manType = choiceDialog.getChoice();
            if ((manType > ManeuverType.MAN_NONE) && addManeuver(manType)) {
                clientgui.bv.drawMovementData(ce, cmd);
            }
View Full Code Here

Examples of megamek.common.Aero

    public Vector<BackGroundDrawer> getBackgroundDrawers(){
        return bgDrawers;
    }

    public void setEntity(Entity e){
        Aero t = (Aero) e;
       
        int armor = t.getCapArmor();
        int armorO = t.getCap0Armor();
       
        drawArmorImage(armorImage, armor, armorO);
        armorVLabel.setValue(Integer.toString(armor));
        drawCrits(avCritImage, t.getAvionicsHits());
        drawCrits(engineCritImage, t.getEngineHits());
        drawCrits(fcsCritImage, t.getFCSHits());
        drawCrits(sensorCritImage, t.getSensorHits());
        drawCrits(pilotCritImage, t.getCrew().getHits());
    }
View Full Code Here

Examples of megamek.common.Aero

    public Vector<BackGroundDrawer> getBackgroundDrawers(){
        return bgDrawers;
    }

    public void setEntity(Entity e){
        Aero t = (Aero) e;
       
        int armor = t.getCapArmor();
        int armorO = t.getCap0Armor();
       
        drawArmorImage(armorImage, armor, armorO);
        armorVLabel.setValue(Integer.toString(armor));
        drawCrits(avCritImage, t.getAvionicsHits());
        drawCrits(engineCritImage, t.getEngineHits());
        drawCrits(fcsCritImage, t.getFCSHits());
        drawCrits(sensorCritImage, t.getSensorHits());
        drawCrits(pilotCritImage, t.getCrew().getHits());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.