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;
}
Aggregations