Search in sources :

Example 6 with CharSprite

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

the class HealthIndicator method update.

@Override
public void update() {
    super.update();
    if (target != null && target.isAlive() && target.getSprite().getVisible()) {
        CharSprite sprite = target.getSprite();
        bg.Scale().x = sprite.width;
        level.Scale().x = sprite.width * target.hp() / target.ht();
        bg.x = level.x = sprite.x;
        bg.y = level.y = sprite.y - HEIGHT - 1;
        setVisible(true);
    } else {
        setVisible(false);
    }
}
Also used : CharSprite(com.watabou.pixeldungeon.sprites.CharSprite)

Example 7 with CharSprite

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

the class Hero method getSprite.

@Override
public CharSprite getSprite() {
    CharSprite sprite = super.getSprite();
    sprite.setVisible(true);
    return sprite;
}
Also used : CharSprite(com.watabou.pixeldungeon.sprites.CharSprite)

Aggregations

CharSprite (com.watabou.pixeldungeon.sprites.CharSprite)7 TrackedRuntimeException (com.nyrds.android.util.TrackedRuntimeException)1 HeroClass (com.watabou.pixeldungeon.actors.hero.HeroClass)1 HeroSubClass (com.watabou.pixeldungeon.actors.hero.HeroSubClass)1 Armor (com.watabou.pixeldungeon.items.armor.Armor)1 Ring (com.watabou.pixeldungeon.items.rings.Ring)1 Wand (com.watabou.pixeldungeon.items.wands.Wand)1 Weapon (com.watabou.pixeldungeon.items.weapon.Weapon)1 MissileWeapon (com.watabou.pixeldungeon.items.weapon.missiles.MissileWeapon)1 MirrorSprite (com.watabou.pixeldungeon.sprites.MirrorSprite)1 MobSpriteDef (com.watabou.pixeldungeon.sprites.MobSpriteDef)1 PointF (com.watabou.utils.PointF)1 JSONException (org.json.JSONException)1