2024-03-22 01:37:05 +01:00
|
|
|
extends Control
|
|
|
|
|
|
2024-03-23 17:49:33 +01:00
|
|
|
const IN_GAME_MENU = preload("res://UI/InGameMenu/InGameMenu.tscn")
|
|
|
|
|
const RULES = preload("res://UI/Rules/Rules.tscn")
|
2024-03-22 01:37:05 +01:00
|
|
|
# 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):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_rules_button_pressed():
|
2024-03-23 17:49:33 +01:00
|
|
|
var rules = RULES.instantiate()
|
|
|
|
|
|
|
|
|
|
get_tree().root.add_child(rules)
|
|
|
|
|
|
2024-03-22 01:37:05 +01:00
|
|
|
rules.show_panel()
|
2024-03-23 17:49:33 +01:00
|
|
|
|
|
|
|
|
func _on_menu_button_pressed():
|
|
|
|
|
var in_game_menu = IN_GAME_MENU.instantiate()
|
|
|
|
|
|
|
|
|
|
get_tree().root.add_child(in_game_menu)
|
|
|
|
|
|
|
|
|
|
in_game_menu.show_panel()
|