summaryrefslogtreecommitdiff
path: root/game/shared/scripts/microgame.gd
diff options
context:
space:
mode:
authorMarcelo Costa <>2024-01-27 16:16:43 -0300
committerMarcelo Costa <>2024-01-27 16:16:43 -0300
commit1aa604aca63ede5f97a68a1b20b51d157b3e614d (patch)
tree9358dbf72f466eff14711a2e1079e55340786449 /game/shared/scripts/microgame.gd
parent7f4fc3b59c286c7c50df43c4f75eab330955e4f3 (diff)
parent9c2895c0015180b8bb43b8f9173af3f790f890df (diff)
downloadgamejam-ggj-2024-1aa604aca63ede5f97a68a1b20b51d157b3e614d.tar.gz
gamejam-ggj-2024-1aa604aca63ede5f97a68a1b20b51d157b3e614d.tar.bz2
gamejam-ggj-2024-1aa604aca63ede5f97a68a1b20b51d157b3e614d.zip
Merge branch 'main' of https://github.com/henriquelalves/ggj2024
Diffstat (limited to 'game/shared/scripts/microgame.gd')
-rw-r--r--game/shared/scripts/microgame.gd24
1 files changed, 23 insertions, 1 deletions
diff --git a/game/shared/scripts/microgame.gd b/game/shared/scripts/microgame.gd
index 29b63ed..15fbc69 100644
--- a/game/shared/scripts/microgame.gd
+++ b/game/shared/scripts/microgame.gd
@@ -1,7 +1,29 @@
class_name Microgame
extends Node
+const MICROGAME_TIMER = 5.0
+
+enum MICROGAME_CONTROL {HEAD_ON_KEYBOARD, INVERTED_HAND, ONLY_PINKY}
+
@export var microgame_name = ""
-@export var instruction = ""
+@export var microgame_control: MICROGAME_CONTROL
+@export var instructions = ""
signal finished(won)
+
+
+func _ready():
+ var timer = Timer.new()
+ add_child(timer)
+ timer.one_shot = true
+ timer.start(MICROGAME_TIMER)
+
+ timer.timeout.connect(func():
+ finished.emit(false)
+ )
+
+ _microgame_ready()
+
+
+func _microgame_ready():
+ pass