v0.8.2c: torches now play a burning sound when ignited

This commit is contained in:
Evan Debenham 2020-08-26 16:48:23 -04:00
parent 269d12d7e2
commit 8e5648bbe4

View File

@ -21,11 +21,13 @@
package com.shatteredpixel.shatteredpixeldungeon.items;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import java.util.ArrayList;
@ -66,6 +68,7 @@ public class Torch extends Item {
detach( hero.belongings.backpack );
Buff.affect(hero, Light.class, Light.DURATION);
Sample.INSTANCE.play(Assets.Sounds.BURNING);
Emitter emitter = hero.sprite.centerEmitter();
emitter.start( FlameParticle.FACTORY, 0.2f, 3 );