BubbleParticle.gd 341 B

1234567891011121314
  1. extends Node2D
  2. var can_kill := false
  3. func _ready() -> void:
  4. await get_tree().create_timer(0.5, false).timeout
  5. can_kill = true
  6. func _physics_process(delta: float) -> void:
  7. global_position.y -= 32 * delta
  8. if global_position.y < -176:
  9. queue_free()
  10. elif $WaterDetection.get_overlapping_bodies().is_empty() and can_kill:
  11. queue_free()