Search in sources :

Example 41 with Entity

use of main.entity.Entity in project Eidolons by IDemiurge.

the class AnimMaster3d method findAtlasRegions.

private static Array<AtlasRegion> findAtlasRegions(TextureAtlas atlas, Boolean projection, DC_ActiveObj activeObj, boolean searchOtherWeaponOrAction) {
    String name = getAtlasFileKeyForAction(projection, activeObj, WEAPON_ANIM_CASE.NORMAL);
    List<Entity> types = null;
    if (searchOtherWeaponOrAction) {
        types = Arrays.stream(DataManager.getBaseWeaponTypes()).filter(type -> type.getProperty(G_PROPS.WEAPON_GROUP).equals(activeObj.getActiveWeapon().getProperty(G_PROPS.WEAPON_GROUP))).collect(Collectors.toList());
    } else {
        types = new ArrayList<>(activeObj.getParentAction().getSubActions());
    }
    Array<AtlasRegion> regions = null;
    for (Entity sub : types) {
        name = sub.getName() + name.substring(name.indexOf(SEPARATOR));
        regions = atlas.findRegions(name.toLowerCase());
        main.system.auxiliary.log.LogMaster.log(1, activeObj + " searching " + name);
        if (regions.size > 0)
            break;
    }
    return regions;
}
Also used : Entity(main.entity.Entity) AtlasRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion)

Aggregations

Entity (main.entity.Entity)41 ObjType (main.entity.type.ObjType)11 Unit (eidolons.entity.obj.unit.Unit)7 PARAMETER (main.content.values.parameters.PARAMETER)5 Obj (main.entity.obj.Obj)5 OBJ_TYPE (main.content.OBJ_TYPE)4 Ref (main.entity.Ref)4 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)3 DC_PagedInfoPanel (eidolons.swing.components.panels.page.info.DC_PagedInfoPanel)3 ArrayList (java.util.ArrayList)3 DC_TYPE (main.content.DC_TYPE)3 ITEM_SLOT (main.content.enums.entity.ItemEnums.ITEM_SLOT)3 DC_SpellObj (eidolons.entity.active.DC_SpellObj)2 DC_WeaponObj (eidolons.entity.item.DC_WeaponObj)2 LinkedList (java.util.LinkedList)2 ActiveObj (main.entity.obj.ActiveObj)2 ArcaneEntity (main.logic.ArcaneEntity)2 AtlasRegion (com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion)1 Vector2 (com.badlogic.gdx.math.Vector2)1 ActionGenerator (eidolons.ability.ActionGenerator)1