Files
imnotsick/text_screens.gd
T
2025-06-05 17:13:19 +02:00

42 lines
959 B
GDScript

extends CanvasLayer
@onready var intro_text_container = $MarginContainer/IntroBoxContainer/TextContainer
@onready var skip = $SkipContainer/SkipButton
signal on_skip_request
signal on_transition_finished
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
skip.pressed.connect(_on_skip_pressed)
self.connect("on_skip_request", _on_skip_request)
self.hide()
for node in intro_text_container.get_children():
node.hide()
func _on_skip_pressed():
if Globals.is_transitioning == false:
on_skip_request.emit()
else:
pass
func _input(event):
if event is InputEventKey and event.pressed and Globals.is_transitioning == false:
if event.keycode == KEY_SPACE:
on_skip_request.emit()
func _on_skip_request():
if Globals.is_transitioning == false:
on_transition_finished.emit()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass