Package org.freerealm.property

Examples of org.freerealm.property.ModifyEfficiency


    public String toXML(ModifyEfficiency modifyEfficiency) {
        return "<ModifyEfficiency modifier=\"" + modifyEfficiency.getModifier() + "\" />";
    }

    public ModifyEfficiency initializeFromNode(Realm realm, Node node) {
        ModifyEfficiency modifyEfficiency = new ModifyEfficiency();
        String modifierString = node.getAttributes().getNamedItem("modifier").getNodeValue();
        modifyEfficiency.setModifier(Integer.parseInt(modifierString));
        return modifyEfficiency;
    }
View Full Code Here


        int efficiencyModifier = 0;
        Iterator propertyEditor = getPropertiesIterator();
        while (propertyEditor.hasNext()) {
            Property property = (Property) propertyEditor.next();
            if (property instanceof ModifyEfficiency) {
                ModifyEfficiency increaseEfficiency = (ModifyEfficiency) property;
                efficiencyModifier = efficiencyModifier + increaseEfficiency.getModifier();
            }
        }
        return efficiencyModifier;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.ModifyEfficiency

Copyright © 2018 www.massapicom. 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.