Package org.freerealm.property

Examples of org.freerealm.property.Buildable


        xml.append("<Buildable buildCost=\"" + buildable.getBuildCost() + "\" upkeepCost=\"" + buildable.getUpkeepCost() + "\"/>");
        return xml.toString();
    }

    public Buildable initializeFromNode(Realm realm, Node node) {
        Buildable buildable = new Buildable();
        int buildCost = Integer.parseInt(node.getAttributes().getNamedItem("buildCost").getNodeValue());
        int upkeepCost = Integer.parseInt(node.getAttributes().getNamedItem("upkeepCost").getNodeValue());
        buildable.setBuildCost(buildCost);
        buildable.setUpkeepCost(upkeepCost);
        return buildable;
    }
View Full Code Here


            return 0;
        }
    }

    public int getProductionCost() {
        Buildable buildable = (Buildable) getAbility("Buildable");
        if (buildable != null) {
            return buildable.getBuildCost();
        } else {
            return 0;
        }
    }
View Full Code Here

            return 0;
        }
    }

    public int getUpkeepCost() {
        Buildable buildable = (Buildable) getAbility("Buildable");
        if (buildable != null) {
            return buildable.getUpkeepCost();
        } else {
            return 0;
        }
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.Buildable

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.