Search in sources :

Example 6 with CharSprite

use of com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite in project shattered-pixel-dungeon-gdx by 00-Evan.

the class QuickSlotButton method useTargeting.

private void useTargeting() {
    if (lastTarget != null && Actor.chars().contains(lastTarget) && lastTarget.isAlive() && Dungeon.level.heroFOV[lastTarget.pos]) {
        targeting = true;
        CharSprite sprite = lastTarget.sprite;
        sprite.parent.addToFront(crossM);
        crossM.point(sprite.center(crossM));
        crossB.point(slot.icon.center(crossB));
        crossB.visible = true;
    } else {
        lastTarget = null;
        targeting = false;
    }
}
Also used : CharSprite(com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite)

Aggregations

CharSprite (com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite)6 Lightning (com.shatteredpixel.shatteredpixeldungeon.effects.Lightning)1 MirrorSprite (com.shatteredpixel.shatteredpixeldungeon.sprites.MirrorSprite)1 PointF (com.watabou.utils.PointF)1 ArrayList (java.util.ArrayList)1