Package org.freerealm.property

Examples of org.freerealm.property.ModifyProduction


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

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


        int productionModifier = 0;
        Iterator propertyIterator = getPropertiesIterator();
        while (propertyIterator.hasNext()) {
            Property property = (Property) propertyIterator.next();
            if (property instanceof ModifyProduction) {
                ModifyProduction increaseProduction = (ModifyProduction) property;
                productionModifier = productionModifier + increaseProduction.getModifier();
            }
        }

        return productionModifier;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.ModifyProduction

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.