append Lobby test 2
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b5xb0fsfpn7r3" path="res://levels/lobby-scene/lobby-terrain.blend" id="3_f73ky"]
|
||||
[ext_resource type="PackedScene" uid="uid://csmfxg011xisf" path="res://player/Player.tscn" id="4_0aw1h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgi81jdv7gs76" path="res://levels/lobby-scene/tent.blend" id="4_qjimh"]
|
||||
[ext_resource type="PackedScene" uid="uid://wcsd1tb0quj3" path="res://levels/lobby-scene/campfire.tscn" id="5_qjimh"]
|
||||
[ext_resource type="PackedScene" path="res://levels/lobby-scene/campfire.tscn" id="5_qjimh"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_f73ky"]
|
||||
|
||||
|
||||
@@ -79,3 +79,18 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer3" type="VBoxContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="TextEdit" type="LineEdit" parent="HBoxContainer/VBoxContainer3"]
|
||||
custom_minimum_size = Vector2(200, 20)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
placeholder_text = "Lobby ID"
|
||||
|
||||
[node name="Button" type="Button" parent="HBoxContainer/VBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "Join"
|
||||
|
||||
@@ -7,6 +7,14 @@ extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
$HBoxContainer/VBoxContainer/Host.pressed.connect(host_game)
|
||||
$HBoxContainer/VBoxContainer3/Button.pressed.connect(join_game)
|
||||
|
||||
|
||||
func join_game():
|
||||
var lobby_id = $HBoxContainer/VBoxContainer3/TextEdit.text
|
||||
|
||||
if int(lobby_id) > 0:
|
||||
SteamManager.join_lobby(int(lobby_id))
|
||||
|
||||
|
||||
func host_game():
|
||||
|
||||
Reference in New Issue
Block a user