Optimized scene tree and debugged some area detection
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
extends Area2D
|
||||
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
signal coin_collected
|
||||
|
||||
|
||||
func _on_Node2D_body_entered(body: Node) -> void:
|
||||
if body.get_name() == "Player":
|
||||
queue_free() # Replace with function body.
|
||||
if body.get_name() == 'Player':
|
||||
emit_signal('coin_collected')
|
||||
queue_free()
|
||||
|
Reference in New Issue
Block a user