v0.8.2c: torches now play a burning sound when ignited
This commit is contained in:
parent
269d12d7e2
commit
8e5648bbe4
|
@ -21,11 +21,13 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.noosa.particles.Emitter;
|
import com.watabou.noosa.particles.Emitter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -66,6 +68,7 @@ public class Torch extends Item {
|
||||||
detach( hero.belongings.backpack );
|
detach( hero.belongings.backpack );
|
||||||
|
|
||||||
Buff.affect(hero, Light.class, Light.DURATION);
|
Buff.affect(hero, Light.class, Light.DURATION);
|
||||||
|
Sample.INSTANCE.play(Assets.Sounds.BURNING);
|
||||||
|
|
||||||
Emitter emitter = hero.sprite.centerEmitter();
|
Emitter emitter = hero.sprite.centerEmitter();
|
||||||
emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
|
emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user