Search in sources :

Example 1 with HeroSpriteDef

use of com.watabou.pixeldungeon.sprites.HeroSpriteDef in project pixel-dungeon-remix by NYRDS.

the class MirrorImage method sprite.

@Override
public CharSprite sprite() {
    if (lookDesc.length > 0) {
        return new HeroSpriteDef(lookDesc);
    } else {
        // handle old saves
        if (Dungeon.hero != null) {
            lookDesc = Dungeon.hero.getHeroSprite().getLayersDesc();
        } else {
            // dirty hack here
            Hero hero = new Hero();
            lookDesc = new HeroSpriteDef(hero).getLayersDesc();
        }
        return sprite();
    }
}
Also used : Hero(com.watabou.pixeldungeon.actors.hero.Hero) HeroSpriteDef(com.watabou.pixeldungeon.sprites.HeroSpriteDef)

Aggregations

Hero (com.watabou.pixeldungeon.actors.hero.Hero)1 HeroSpriteDef (com.watabou.pixeldungeon.sprites.HeroSpriteDef)1