diff options
| author | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 03:30:47 +0000 |
|---|---|---|
| committer | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 03:30:47 +0000 |
| commit | 34b97ea823b1627eac2b91825cd1a748d87afd60 (patch) | |
| tree | 6fc8a22fee383e46b56099134f1fc2844aa35b15 /Coin.gd | |
| parent | 61fe177dc7ed9f0f667fc28b85cc68ce166e3410 (diff) | |
Add coin scoring
Diffstat (limited to 'Coin.gd')
| -rw-r--r-- | Coin.gd | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +extends StaticBody2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var timer + +# Called when the node enters the scene tree for the first time. +func _ready(): + timer = Timer.new() + get_parent().add_child(timer) + timer.one_shot = true + timer.connect("timeout", self, "_on_timer_timeout") + timer.start(5.0) + +func _on_timer_timeout() -> void: + queue_free() +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# if timer.stopp |
