25 lines
527 B
GDScript3
25 lines
527 B
GDScript3
|
extends Control
|
||
|
|
||
|
onready var player_settings = find_node("player_settings")
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
find_node("bots").set_pressed(config.get_value("game","bots", true))
|
||
|
|
||
|
|
||
|
func _draw():
|
||
|
find_node("start").grab_focus()
|
||
|
|
||
|
|
||
|
func _on_start_pressed():
|
||
|
var name = player_settings.get_name_node().text
|
||
|
var color = player_settings.get_color_node().color
|
||
|
var bots = find_node("bots").is_pressed()
|
||
|
queue_free()
|
||
|
server.local_game(name,color,bots)
|
||
|
|
||
|
|
||
|
func _on_back_pressed():
|
||
|
queue_free()
|
||
|
get_tree().get_root().get_node("main_menu").show()
|