use of com.watabou.noosa.CompositeTextureImage in project pixel-dungeon-remix by NYRDS.
the class Library method infoHeader.
public static EntryHeader infoHeader(String category, String clazz) {
EntryHeader ret = new EntryHeader();
if (category.equals(ITEM)) {
Item item = ItemFactory.itemByName(clazz);
ret.header = Utils.capitalize(item.name());
ret.icon = new ItemSprite(item);
return ret;
}
if (category.equals(MOB)) {
Mob mob = MobFactory.mobByName(clazz);
ret.header = Utils.capitalize(mob.getName());
ret.icon = new CompositeTextureImage();
((CompositeTextureImage) ret.icon).copy(mob.sprite().avatar());
return ret;
}
throw new TrackedRuntimeException("unknown category: " + category);
}
use of com.watabou.noosa.CompositeTextureImage in project pixel-dungeon-remix by NYRDS.
the class CharSprite method avatar.
public CompositeTextureImage avatar() {
CompositeTextureImage avatar = new CompositeTextureImage(texture);
avatar.frame(idle.frames[0]);
avatar.addLayer(texture);
return avatar;
}
use of com.watabou.noosa.CompositeTextureImage in project pixel-dungeon-remix by NYRDS.
the class HeroSpriteDef method avatar.
@Override
public CompositeTextureImage avatar() {
if (avatar == null) {
avatar = new CompositeTextureImage(texture);
avatar.frame(idle.frames[0]);
}
avatar.clearLayers();
avatar.addLayer(getLayerTexture(LAYER_BODY));
avatar.addLayer(getLayerTexture(LAYER_HEAD));
avatar.addLayer(getLayerTexture(LAYER_HAIR));
avatar.addLayer(getLayerTexture(LAYER_ARMOR));
avatar.addLayer(getLayerTexture(LAYER_FACIAL_HAIR));
avatar.addLayer(getLayerTexture(LAYER_HELMET));
avatar.addLayer(getLayerTexture(LAYER_DEATH));
avatar.addLayer(getLayerTexture(LAYER_ACCESSORY));
return avatar;
}
Aggregations