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