Search in sources :

Example 1 with ANIM_VALUES

use of eidolons.libgdx.anims.AnimData.ANIM_VALUES in project Eidolons by IDemiurge.

the class AnimationConstructor method preconstructAllForAV.

public static void preconstructAllForAV() {
    for (ObjType type : DataManager.getTypes(DC_TYPE.SPELLS)) {
        DC_SpellObj active = new DC_SpellObj(type, Player.NEUTRAL, DC_Game.game, new Ref());
        AnimData data = null;
        try {
            int i = 0;
            for (ANIM_PART part : ANIM_PART.values()) {
                data = new AnimationConstructor().getStandardData(active, part, i);
                for (ANIM_VALUES val : ANIM_VALUES.values()) {
                    String identifier;
                    switch(val) {
                        case PARTICLE_EFFECTS:
                            identifier = "SFX";
                            break;
                        case SPRITES:
                            identifier = "SPRITE";
                            break;
                        default:
                            continue;
                    }
                    String value = data.getValue(val);
                    if (StringMaster.isEmpty(value))
                        continue;
                    value = value.replace(PathFinder.getImagePath().toLowerCase(), "");
                    i++;
                    PROPERTY prop = ContentManager.findPROP("anim" + "_" + identifier + "_" + part);
                    if (prop == null)
                        continue;
                    type.setProperty(prop, value);
                }
            }
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
    }
}
Also used : Ref(main.entity.Ref) ObjType(main.entity.type.ObjType) PROPERTY(main.content.values.properties.PROPERTY) ANIM_VALUES(eidolons.libgdx.anims.AnimData.ANIM_VALUES) DC_SpellObj(eidolons.entity.active.DC_SpellObj)

Aggregations

DC_SpellObj (eidolons.entity.active.DC_SpellObj)1 ANIM_VALUES (eidolons.libgdx.anims.AnimData.ANIM_VALUES)1 PROPERTY (main.content.values.properties.PROPERTY)1 Ref (main.entity.Ref)1 ObjType (main.entity.type.ObjType)1