Package org.freerealm.property

Examples of org.freerealm.property.SetMovementCost


    public String toXML(SetMovementCost setMovementCost) {
        return "<SetMovementCost movementCost=\"" + setMovementCost.getMovementCost() + "\" />";
    }

    public SetMovementCost initializeFromNode(Realm realm, Node node) {
        SetMovementCost setMovementCost = new SetMovementCost();
        String movementCostString = node.getAttributes().getNamedItem("movementCost").getNodeValue();
        setMovementCost.setMovementCost(Float.parseFloat(movementCostString));
        return setMovementCost;
    }
View Full Code Here


        float movementCost = 0;
        Iterator<Property> propertyEditor = getPropertiesIterator();
        while (propertyEditor.hasNext()) {
            Property property = propertyEditor.next();
            if (property instanceof SetMovementCost) {
                SetMovementCost setMovementCost = (SetMovementCost) property;
                if (movementCost == 0 || setMovementCost.getMovementCost() < movementCost) {
                    movementCost = setMovementCost.getMovementCost();
                }
            }
        }
        return movementCost;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.SetMovementCost

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.