Explosion.gd 249 B

12345678910111213141516
  1. extends Area3D
  2. func _ready() -> void:
  3. pass
  4. func _on_Timer_timeout() -> void:
  5. call_deferred("queue_free")
  6. func _on_Explosion_body_entered(body: Node3D) -> void:
  7. #print("explosion: " + str(body.name))
  8. if body.has_method("hit"):
  9. body.hit()