v0.7.5: detached shocking sfx from lightning vfx
This commit is contained in:
parent
309b7357b2
commit
6c18bc613c
|
@ -21,13 +21,11 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.effects;
|
package com.shatteredpixel.shatteredpixeldungeon.effects;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||||
import com.watabou.glwrap.Blending;
|
import com.watabou.glwrap.Blending;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.Group;
|
import com.watabou.noosa.Group;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.PointF;
|
import com.watabou.utils.PointF;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
@ -72,8 +70,6 @@ public class Lightning extends Group {
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
|
|
||||||
life = DURATION;
|
life = DURATION;
|
||||||
|
|
||||||
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final double A = 180 / Math.PI;
|
private static final double A = 180 / Math.PI;
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
|
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
@ -33,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
@ -78,6 +80,7 @@ public class ShockBomb extends Bomb {
|
||||||
|
|
||||||
CellEmitter.center(cell).burst(SparkParticle.FACTORY, 20);
|
CellEmitter.center(cell).burst(SparkParticle.FACTORY, 20);
|
||||||
Dungeon.hero.sprite.parent.addToFront(new Lightning(arcs, null));
|
Dungeon.hero.sprite.parent.addToFront(new Lightning(arcs, null));
|
||||||
|
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -69,6 +69,8 @@ public class StoneOfShock extends Runestone {
|
||||||
if (hits > 0) {
|
if (hits > 0) {
|
||||||
curUser.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
curUser.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
||||||
curUser.sprite.centerEmitter().burst(EnergyParticle.FACTORY, 10);
|
curUser.sprite.centerEmitter().burst(EnergyParticle.FACTORY, 10);
|
||||||
|
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
||||||
|
|
||||||
curUser.belongings.charge(1f + hits);
|
curUser.belongings.charge(1f + hits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
@ -36,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.Camera;
|
import com.watabou.noosa.Camera;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
@ -136,6 +138,7 @@ public class WandOfLightning extends DamageWand {
|
||||||
|
|
||||||
//don't want to wait for the effect before processing damage.
|
//don't want to wait for the effect before processing damage.
|
||||||
curUser.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
curUser.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
||||||
|
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
||||||
callback.call();
|
callback.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
@ -29,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
@ -58,6 +60,7 @@ public class Shocking extends Weapon.Enchantment {
|
||||||
}
|
}
|
||||||
|
|
||||||
attacker.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
attacker.sprite.parent.addToFront( new Lightning( arcs, null ) );
|
||||||
|
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,12 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
|
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.PointF;
|
import com.watabou.utils.PointF;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
@ -47,6 +49,7 @@ public class ShockingDart extends TippedDart {
|
||||||
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.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)));
|
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)));
|
||||||
s.parent.add(new Lightning(arcs, null));
|
s.parent.add(new Lightning(arcs, null));
|
||||||
|
Sample.INSTANCE.play( Assets.SND_LIGHTNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.proc(attacker, defender, damage);
|
return super.proc(attacker, defender, damage);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user