Examples of locations()


Examples of megamek.common.Aero.locations()

    public void setEntity(Entity e){
      Aero t = (Aero) e;
      int a = 1;
        int a0 = 1;
        //TODO: change this back to locations
      for(int i = 0; i < t.locations(); i++){
           a = t.getArmor(i);
             a0 = t.getOArmor(i);
             vLabels[i].setValue(t.getArmorString(i));
             WidgetUtils.setAreaColor(areas[i], vLabels[i], (double)a/(double)a0);
            
View Full Code Here

Examples of megamek.common.Aero.locations()

    public void setEntity(Entity e){
        Aero t = (Aero) e;
        int a = 1;
        int a0 = 1;
        //TODO: change this back to locations
        for(int i = 0; i < t.locations(); i++){
            a = t.getArmor(i);
            a0 = t.getOArmor(i);
            vLabels[i].setValue(t.getArmorString(i));
            WidgetUtils.setAreaColor(areas[i], vLabels[i], (double)a/(double)a0);
View Full Code Here

Examples of megamek.common.Aero.locations()

    public void setEntity(Entity e){
        Aero t = (Aero) e;
        int a = 1;
        int a0 = 1;
        //TODO: change this back to locations
        for(int i = 0; i < t.locations(); i++){
            a = t.getArmor(i);
            a0 = t.getOArmor(i);
            vLabels[i].setValue(t.getArmorString(i));
            WidgetUtils.setAreaColor(areas[i], vLabels[i], (double)a/(double)a0);
View Full Code Here

Examples of megamek.common.Aero.locations()

    public void setEntity(Entity e){
        Aero t = (Aero) e;
        int a = 1;
        int a0 = 1;
        //TODO: change this back to locations
        for(int i = 0; i < t.locations(); i++){
            a = t.getArmor(i);
            a0 = t.getOArmor(i);
            vLabels[i].setValue(t.getArmorString(i));
            WidgetUtils.setAreaColor(areas[i], vLabels[i], (double)a/(double)a0);
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

                            "Couldn't get an integer from " + attrStr);
                }

                /* Shooting strength is set... oddly. */
                // Calculate the number of troopers who can't shoot.
                attrVal = entity.locations() - attrVal - 1;

                // Initialize the internals, then mark off the non-shooting
                // troopers (work last to first); the EntityEncoder will
                // override these values to the actual values.
                entity.autoSetInternal();
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

                // Initialize the internals, then mark off the non-shooting
                // troopers (work last to first); the EntityEncoder will
                // override these values to the actual values.
                entity.autoSetInternal();
                for (int loop = 1; loop <= attrVal; loop++) {
                    entity.setInternal(IArmorState.ARMOR_NA, entity.locations()
                            - loop);
                }

                // Now apply the damage.
                entity.applyDamage();
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

        // Set the weight (number of troops), and then initialize the armor.
        retVal.setWeight(stateMenPerSquad);
        retVal.refreshLocations();
        retVal.autoSetInternal();
        retVal.setArmorType(stateArmorType);
        for (int x = 1; x < retVal.locations(); x++) {
            retVal.initializeArmor(stateArmorValue, x);
        }

        // Set the tech base.
        if (stateTechBase == TECH_BASE_IS) {
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

        // Set the weight (number of troops), and then initialize the armor.
        retVal.setWeight(stateMenPerSquad);
        retVal.refreshLocations();
        retVal.autoSetInternal();
        retVal.setArmorType(stateArmorType);
        for (int x = 1; x < retVal.locations(); x++) {
            retVal.initializeArmor(stateArmorValue, x);
        }

        // Set the tech base.
        if (stateTechBase == TECH_BASE_IS) {
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

            throw new EntityLoadingException("Incorrect armor array length");
        }

        // add the body to the armor array
        t.refreshLocations();
        for (int x = 1; x < t.locations(); x++) {
            t.initializeArmor(armor[0], x);
        }

        t.autoSetInternal();
View Full Code Here

Examples of megamek.common.BattleArmor.locations()

        t.autoSetInternal();

        loadEquipment(t, "Squad", BattleArmor.LOC_SQUAD);
        String[] abbrs = t.getLocationAbbrs();
        for (int loop = 1; loop < t.locations(); loop++) {
            loadEquipment(t, abbrs[loop], loop);
        }
        return t;
    }
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.