2021-11-27 16:51:59 +10:30
|
|
|
extends Control
|
2024-03-22 21:27:13 +10:30
|
|
|
export var mainMenuPath := @'MainMenu'
|
|
|
|
onready var mainMenu := get_node(mainMenuPath)
|
2021-11-27 16:51:59 +10:30
|
|
|
|
2024-03-22 21:27:13 +10:30
|
|
|
const touchGamePath := 'res://scenes/RadialGame.tscn'
|
|
|
|
const stepGamePath := 'res://scenes/StepGame.tscn'
|
|
|
|
var touchGameScene := preload(touchGamePath)
|
|
|
|
var stepGameScene := preload(stepGamePath)
|
2021-11-27 16:51:59 +10:30
|
|
|
|
2024-03-22 21:27:13 +10:30
|
|
|
var activeGame: Node = null
|
2021-11-27 16:51:59 +10:30
|
|
|
|
|
|
|
func _on_MainMenu_start_stepgame() -> void:
|
2024-03-22 21:27:13 +10:30
|
|
|
mainMenu.hide()
|
|
|
|
activeGame = stepGameScene.instance()
|
|
|
|
add_child_below_node(mainMenu, activeGame)
|
2021-11-27 16:51:59 +10:30
|
|
|
|
|
|
|
|
|
|
|
func _on_MainMenu_start_touchgame() -> void:
|
2024-03-22 21:27:13 +10:30
|
|
|
mainMenu.hide()
|
|
|
|
activeGame = touchGameScene.instance()
|
|
|
|
add_child_below_node(mainMenu, activeGame)
|
|
|
|
activeGame.alignment_horizontal = AspectRatioContainer.ALIGN_BEGIN
|