obsidian/MyObsidianVault/Knowledgebase/Godot/2D/Tutorial M5 - Loot it all/01. Self delete on collision (Area2D node).md

10 lines
165 B
Markdown
Raw Normal View History

2024-03-07 17:47:56 +01:00
```python
extends Area2D
func _ready() -> void:
area_entered.connect(_on_area_entered)
func _on_area_entered(area_that_entred: Area2D) -> void:
queue_free()
```