summaryrefslogtreecommitdiff
path: root/game/shared/scripts/microgame.gd
blob: 15fbc694e62df00e0538890a0ac0bf1d183bd4a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 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