Package multididdy_tools

Examples of multididdy_tools.ConfigReader


        String[] children = dir.list();

        for (int i = 0; i < children.length; ++i) {
            Debug.p(children[i], 5);
            ConfigReader conf = new ConfigReader(pathToWeapons + "/" + children[i] + "/weapon.ini");
            Weapon newW = new Weapon();

            newW.directory = pathToWeapons + "/" + children[i];
            //könnte man noch die bilder für die animationen reinladen

            newW.name = conf.getString("name");
            newW.type = WeaponTypes.valueOf(conf.getString("type"));
            newW.power = conf.getInt("power");
            newW.speed = conf.getInt("speed");
            newW.range = conf.getInt("range");
            newW.defaultAmmo = conf.getInt("defaultAmmo");
            newW.costMana = conf.getInt("costMana");
            newW.costStamina = conf.getInt("costStamina");
            newW.explosion = conf.getBool("explosion");
            newW.explosionRange = conf.getInt("explosionRange");
            newW.animationFrames = conf.getValues("animationFrames");
            newW.explosionFrames = conf.getValues("explosionFrames");
            newW.shootingFrames = conf.getValues("shootingFrames");

            weapons.add(newW);

        }
    }
View Full Code Here


        String[] children = dir.list();

        for (int i = 0; i < children.length; ++i) {
            Debug.p(children[i], 5);
            ConfigReader conf = new ConfigReader(pathToItems + "/" + children[i] + "/item.ini");
            Item newI = new Item();

            newI.directory = pathToItems + "/" + children[i];
            //könnte man noch die bilder für die animationen reinladen

            newI.name = conf.getString("name");
            newI.type = ItemTypes.valueOf(conf.getString("type"));
            newI.pAttribute = PlayerAttributes.valueOf(conf.getString("pAttribute"));
            newI.wAttribute = WeaponAttribute.valueOf(conf.getString("wAttribute"));   
            newI.value = conf.getInt("value");
            newI.spawnTime = conf.getInt("spawnTime");
           

            items.add(newI);

       
View Full Code Here

TOP

Related Classes of multididdy_tools.ConfigReader

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.