[Minimal] Merge fixes

This commit is contained in:
Alan Alexander Cerna
2021-11-18 13:48:08 +02:00
parent 1e78e16b8a
commit a1f461427c
3 changed files with 31 additions and 43 deletions

View File

@@ -2,24 +2,12 @@ extends Control
var player = load("res://source/entities/player/player_node.tscn")
func _ready() -> void:
username_text_edit.call_deferred("grab_focus")
func _process(_delta) -> void:
if Input.is_action_just_pressed("esc"):
# warning-ignore:return_value_discarded
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
if Input.is_action_just_pressed("enter") and username_text_edit.is_visible_in_tree():
_on_confirm_pressed()
func _on_confirm_pressed():
if username_text_edit.text != "":
Global.alive_players.append(self)
Network.current_player_username = username_text_edit.text
Network.create_server()
instance_player(get_tree().get_network_unique_id())
rpc("switch_to_game")
func _ready():
Global.alive_players.append(self)
Network.current_player_username = "You"
Network.create_server()
instance_player(get_tree().get_network_unique_id())
rpc("switch_to_game")
func instance_player(id) -> void:

View File

@@ -54,8 +54,8 @@ margin_left = -150.0
margin_top = -36.0
margin_right = 150.0
margin_bottom = 36.0
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
text = "playground"
align = 1
valign = 1
@@ -80,8 +80,8 @@ margin_left = -98.8223
margin_top = -36.0
margin_right = 134.178
margin_bottom = 36.0
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
text = "LAN Party"
align = 1
valign = 1
@@ -112,8 +112,8 @@ margin_left = -150.0
margin_top = -36.0
margin_right = 150.0
margin_bottom = 36.0
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
text = "EXIT"
align = 1
valign = 1