RhythmGame/main.gd

22 lines
637 B
GDScript

extends Control
onready var mainMenu := $'%mainMenu'
const touchGamePath := 'res://scenes/RadialGame.tscn'
const stepGamePath := 'res://scenes/StepGame.tscn'
var touchGameScene := preload(touchGamePath)
var stepGameScene := preload(stepGamePath)
var activeGame: Node = null
func _on_MainMenu_start_stepgame() -> void:
mainMenu.hide()
activeGame = stepGameScene.instance()
add_child_below_node(mainMenu, activeGame)
func _on_MainMenu_start_touchgame() -> void:
mainMenu.hide()
activeGame = touchGameScene.instance()
add_child_below_node(mainMenu, activeGame)
activeGame.alignment_horizontal = AspectRatioContainer.ALIGN_BEGIN