summaryrefslogtreecommitdiff
path: root/Scripts/Tutorial.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/Tutorial.gd')
-rw-r--r--Scripts/Tutorial.gd31
1 files changed, 31 insertions, 0 deletions
diff --git a/Scripts/Tutorial.gd b/Scripts/Tutorial.gd
new file mode 100644
index 0000000..91236eb
--- /dev/null
+++ b/Scripts/Tutorial.gd
@@ -0,0 +1,31 @@
+extends Node
+class_name Tutorial
+## OH NO 1 HOUR LEFT
+
+@export var step_controls : Array[Control]
+@export var current_step : int = 0
+
+var tutorial_started = false
+
+func _ready():
+ if !GlobalVariables.tutorial_played:
+ start_tutorial()
+
+func _input(_event):
+ if Input.is_action_just_pressed("space") && tutorial_started:
+ next_step()
+
+func start_tutorial():
+ tutorial_started = true
+ step_controls[0].visible = true
+ current_step = 0
+
+func next_step():
+ if current_step + 1 < step_controls.size():
+ step_controls[current_step].visible = false
+ step_controls[current_step + 1].visible = true
+ current_step += 1
+ else:
+ step_controls[current_step].visible = false
+ tutorial_started = false
+ GlobalVariables.tutorial_played = true