31 lines
736 B
GDScript
31 lines
736 B
GDScript
extends Control
|
|
|
|
var credits_shown : bool = false
|
|
|
|
@export var level_node : Control
|
|
@export var credits_node : Control
|
|
@export var credits_button : Button
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
if credits_shown:
|
|
credits_node.visible = true
|
|
level_node.visible = false
|
|
credits_button.text = "Back to Level Select"
|
|
else:
|
|
credits_node.visible = false
|
|
level_node.visible = true
|
|
credits_button.text = "Credits"
|
|
|
|
|
|
func _on_credits_button_pressed():
|
|
credits_shown = !credits_shown
|
|
|
|
|
|
func _on_credits_page_meta_clicked(meta):
|
|
OS.shell_open(str(meta))
|