26 lines
454 B
GDScript
26 lines
454 B
GDScript
extends Control
|
|
|
|
@onready var game = get_tree().get_current_scene() as Game
|
|
@onready var previous = $MAIN
|
|
@onready var current = $MAIN
|
|
|
|
func _on_main_start_game():
|
|
previous = current
|
|
current = $"START GAME"
|
|
$"START GAME".show()
|
|
|
|
func back():
|
|
current.hide()
|
|
previous.show()
|
|
var tmp = current
|
|
current = previous
|
|
previous = tmp
|
|
|
|
func _on_start_game_start_game():
|
|
game.load_map()
|
|
self.hide()
|
|
|
|
func _on_start_game_back():
|
|
previous = $MAIN
|
|
back()
|