37 lines
841 B
GDScript
37 lines
841 B
GDScript
extends Control
|
|
|
|
@onready var play_button = $CenterContainer/HBoxContainer/PlayButton
|
|
@onready var credits_button = $CenterContainer/HBoxContainer/CreditsButton
|
|
@onready var controls_button = $CenterContainer/HBoxContainer/ControlsButton
|
|
@onready var music = $"../Music"
|
|
@onready var credits = $Credits
|
|
@onready var about = $About
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
play_button.grab_focus()
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
|
|
func _on_play_button_pressed():
|
|
get_tree().change_scene_to_file("res://Level/Island.tscn")
|
|
|
|
|
|
func _on_credits_button_pressed():
|
|
if not credits.visible:
|
|
credits.show()
|
|
else:
|
|
credits.hide()
|
|
|
|
|
|
func _on_controls_button_pressed():
|
|
if not about.visible:
|
|
about.show()
|
|
else:
|
|
about.hide()
|