v0.6.2: fixed gold dropping VFX triggering when it shouldn't trigger
This commit is contained in:
parent
ca077cefae
commit
7054594f7d
|
@ -158,7 +158,7 @@ public class ItemSprite extends MovieClip {
|
||||||
speed.set( 0, -100 );
|
speed.set( 0, -100 );
|
||||||
acc.set(0, -speed.y / DROP_INTERVAL * 2);
|
acc.set(0, -speed.y / DROP_INTERVAL * 2);
|
||||||
|
|
||||||
if (visible && heap != null && heap.peek() instanceof Gold) {
|
if (heap != null && heap.seen && heap.peek() instanceof Gold) {
|
||||||
CellEmitter.center( heap.pos ).burst( Speck.factory( Speck.COIN ), 5 );
|
CellEmitter.center( heap.pos ).burst( Speck.factory( Speck.COIN ), 5 );
|
||||||
Sample.INSTANCE.play( Assets.SND_GOLD, 1, 1, Random.Float( 0.9f, 1.1f ) );
|
Sample.INSTANCE.play( Assets.SND_GOLD, 1, 1, Random.Float( 0.9f, 1.1f ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user