Lots of polish things and wrapping up all three levels

This commit is contained in:
Nathan Anderson
2022-08-08 15:32:57 -06:00
parent c7d42e09ce
commit 09eada305d
176 changed files with 3068 additions and 403 deletions
+45
View File
@@ -0,0 +1,45 @@
extends Control
export var HEADER_TIME := 3.0
export var BODY_TIME := 8.0
signal done_reading()
onready var header_text := $ColorRect/VBoxContainer/HeaderText
onready var body_text := $ColorRect/VBoxContainer/BodyText
onready var text_timer := $TextTimer
var text_to_readout := 0
func _ready() -> void:
# This throws an error in the base level idk why
# if OS.is_debug_build():
# emit_signal("done_reading")
# else:
header_text.percent_visible = 0.0
body_text.percent_visible = 0.0
text_timer.start(1)
func _process(delta: float) -> void:
match text_to_readout:
1:
header_text.percent_visible = (HEADER_TIME - text_timer.time_left) / HEADER_TIME + 0.05
3:
body_text.percent_visible = (BODY_TIME - text_timer.time_left) / BODY_TIME + 0.05
func _on_TextTimer_timeout() -> void:
match text_to_readout:
0:
text_timer.start(HEADER_TIME)
1:
text_timer.start(1)
2:
text_timer.start(BODY_TIME)
3:
text_timer.start(1)
4:
emit_signal("done_reading")
text_to_readout += 1