freeftf/scripts/create.gd
patrick_pluto 8435fb0cf8 Bugfixes
2024-08-03 22:24:08 +02:00

22 lines
976 B
GDScript

## Copyright (C) 2024 Patrick_Pluto
##
## This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
##
## This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
extends Control
func _ready():
Server.create_game()
func _on_start_pressed():
Server.send_playerinfo(get_tree().root.get_node("create/player_customization/name").text, multiplayer.get_unique_id())
Server.start_game.rpc(Server.players)
func _input(event):
if Input.is_action_just_pressed("escape"):
get_tree().change_scene_to_file("res://menus/main_menu.tscn")