Files
JumpRopeOldTech/hidden_coin.gd
T
Debugman 4aae35ee49
ci/woodpecker/push/woodpecker Pipeline was successful
Improved tutorial
2026-10-18 00:53:35 -05:00

18 lines
427 B
GDScript

extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
add_to_group("Hidden")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func on_contact(body: Node2D) -> void:
print(body)
$AudioStreamPlayer2D.play()
visible = false
%Player2D.coins += 1
await get_tree().create_timer(0.2).timeout
queue_free()