use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.
the class ShockingDart method proc.
@Override
public int proc(Char attacker, Char defender, int damage) {
defender.damage(Random.NormalIntRange(8, 12), this);
CharSprite s = defender.sprite;
ArrayList<Lightning.Arc> arcs = new ArrayList<>();
arcs.add(new Lightning.Arc(new PointF(s.x, s.y + s.height / 2), new PointF(s.x + s.width, s.y + s.height / 2)));
arcs.add(new Lightning.Arc(new PointF(s.x + s.width / 2, s.y), new PointF(s.x + s.width / 2, s.y + s.height)));
defender.sprite.parent.add(new Lightning(arcs, null));
return super.proc(attacker, defender, damage);
}
use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.
the class MirrorImage method sprite.
@Override
public CharSprite sprite() {
CharSprite s = super.sprite();
((MirrorSprite) s).updateArmor(tier);
return s;
}
use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.
the class CharHealthIndicator method update.
@Override
public void update() {
super.update();
if (target != null && target.isAlive() && target.sprite.visible) {
CharSprite sprite = target.sprite;
width = sprite.width() * (4 / 6f);
x = sprite.x + sprite.width() / 6f;
y = sprite.y - 2;
level(target);
visible = target.HP < target.HT;
} else {
visible = false;
}
}
use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.
the class GameScene method addMobSprite.
private void addMobSprite(Mob mob) {
CharSprite sprite = mob.sprite();
sprite.visible = Dungeon.level.heroFOV[mob.pos];
mobs.add(sprite);
sprite.link(mob);
}
use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.
the class TargetHealthIndicator method update.
@Override
public void update() {
super.update();
if (target != null && target.isAlive() && target.sprite.visible) {
CharSprite sprite = target.sprite;
width = sprite.width;
x = sprite.x;
y = sprite.y - 3;
level(target);
visible = true;
} else {
visible = false;
}
}
Aggregations