Search in sources :

Example 1 with TorchHalo

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

the class CharSprite method add.

public void add(State state) {
    switch(state) {
        case BURNING:
            burning = emitter();
            burning.pour(FlameParticle.FACTORY, 0.06f);
            if (visible) {
                Sample.INSTANCE.play(Assets.SND_BURNING);
            }
            break;
        case LEVITATING:
            levitation = emitter();
            levitation.pour(Speck.factory(Speck.JET), 0.02f);
            break;
        case INVISIBLE:
            if (invisible != null) {
                invisible.killAndErase();
            }
            invisible = new AlphaTweener(this, 0.4f, 0.4f);
            if (parent != null) {
                parent.add(invisible);
            } else
                alpha(0.4f);
            break;
        case PARALYSED:
            paused = true;
            break;
        case FROZEN:
            iceBlock = IceBlock.freeze(this);
            paused = true;
            break;
        case ILLUMINATED:
            GameScene.effect(halo = new TorchHalo(this));
            break;
        case CHILLED:
            chilled = emitter();
            chilled.pour(SnowParticle.FACTORY, 0.1f);
            break;
        case DARKENED:
            darkBlock = DarkBlock.darken(this);
            break;
        case MARKED:
            marked = emitter();
            marked.pour(ShadowParticle.UP, 0.1f);
            break;
        case HEALING:
            healing = emitter();
            healing.pour(Speck.factory(Speck.HEALING), 0.5f);
    }
}
Also used : TorchHalo(com.shatteredpixel.shatteredpixeldungeon.effects.TorchHalo) AlphaTweener(com.watabou.noosa.tweeners.AlphaTweener)

Aggregations

TorchHalo (com.shatteredpixel.shatteredpixeldungeon.effects.TorchHalo)1 AlphaTweener (com.watabou.noosa.tweeners.AlphaTweener)1