aboutsummaryrefslogtreecommitdiffstats
path: root/Coin.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Coin.gd')
-rw-r--r--Coin.gd21
1 files changed, 21 insertions, 0 deletions
diff --git a/Coin.gd b/Coin.gd
new file mode 100644
index 0000000..fa5610e
--- /dev/null
+++ b/Coin.gd
@@ -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