added nice smoke puffs to interactible objects
This commit is contained in:
@@ -140,6 +140,9 @@ func _land():
|
||||
tween.tween_property(sprite, "scale", Vector2(1.0, 1.0), 0.1)
|
||||
|
||||
print(name, " landed!")
|
||||
$SfxLand.play()
|
||||
$DragParticles.emitting = true
|
||||
$DragParticles/TimerSmokeParticles.start()
|
||||
|
||||
func _handle_air_collision():
|
||||
# Handle collision while airborne
|
||||
@@ -273,11 +276,13 @@ func _break_into_pieces():
|
||||
|
||||
play_destroy_sound()
|
||||
self.set_deferred("collision_layer", 0)
|
||||
self.visible = false
|
||||
$Shadow.visible = false
|
||||
$Sprite2DAbove.visible = false
|
||||
$Sprite2D.visible = false
|
||||
if ($SfxShatter.playing):
|
||||
await $SfxShatter.finished
|
||||
if ($SfxBreakCrate.playing):
|
||||
await $SfxShatter.finished
|
||||
await $SfxBreakCrate.finished
|
||||
# Remove self
|
||||
queue_free()
|
||||
|
||||
@@ -652,6 +657,8 @@ func play_destroy_sound():
|
||||
$SfxShatter.play()
|
||||
else:
|
||||
$SfxBreakCrate.play()
|
||||
$DragParticles.emitting = true
|
||||
$DragParticles/TimerSmokeParticles.start()
|
||||
pass
|
||||
|
||||
func play_drag_sound():
|
||||
@@ -661,9 +668,16 @@ func play_drag_sound():
|
||||
else:
|
||||
if !$SfxDragRock.playing:
|
||||
$SfxDragRock.play()
|
||||
$DragParticles.emitting = true
|
||||
pass
|
||||
|
||||
func stop_drag_sound():
|
||||
$SfxDrag.stop()
|
||||
$SfxDragRock.stop()
|
||||
$DragParticles.emitting = false
|
||||
pass
|
||||
|
||||
|
||||
func _on_timer_smoke_particles_timeout() -> void:
|
||||
$DragParticles.emitting = false
|
||||
pass # Replace with function body.
|
||||
|
||||
Reference in New Issue
Block a user