-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
687 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/.import | ||
/.godot | ||
/.godot | ||
/.vscode | ||
/exports | ||
!/exports/.gdignore |
Submodule sxgd
updated
93 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
extends Node | ||
|
||
func _ready() -> void: | ||
SxDebugTools.setup_global_instance(get_tree()) | ||
SxSceneTransitioner.setup_global_instance(get_tree()) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
extends MarginContainer | ||
|
||
@onready var _host_button := %HostButton as Button | ||
@onready var _join_client1_button := %JoinClient1Button as Button | ||
@onready var _join_client2_button := %JoinClient2Button as Button | ||
@onready var _show_logs := %ShowLogs as Button | ||
@onready var _show_tree := %ShowTree as Button | ||
|
||
|
||
func _ready() -> void: | ||
_host_button.pressed.connect(func(): | ||
var server := SxNetServerPeer.new() | ||
server.port = 12340 | ||
server.max_clients = 16 | ||
add_child(server) | ||
|
||
_host_button.disabled = true | ||
) | ||
|
||
_join_client1_button.pressed.connect(func(): | ||
var client := SxNetClientPeer.new() | ||
client.name = "Client1" | ||
client.server_address = "localhost" | ||
client.server_port = 12340 | ||
add_child(client) | ||
|
||
_join_client1_button.disabled = true | ||
) | ||
|
||
_join_client2_button.pressed.connect(func(): | ||
var client := SxNetClientPeer.new() | ||
client.name = "Client2" | ||
client.server_address = "localhost" | ||
client.server_port = 12340 | ||
add_child(client) | ||
|
||
_join_client2_button.disabled = true | ||
) | ||
|
||
_show_logs.pressed.connect(func(): | ||
var instance := SxDebugTools.get_global_instance(get_tree()) | ||
instance.show_tools() | ||
instance.show_specific_panel(SxDebugTools.PanelType.LOG) | ||
) | ||
|
||
_show_tree.pressed.connect(func(): | ||
var instance := SxDebugTools.get_global_instance(get_tree()) | ||
instance.show_tools() | ||
instance.show_specific_panel(SxDebugTools.PanelType.SCENE_TREE_DUMP) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://clph1uerknhev"] | ||
|
||
[ext_resource type="Script" path="res://kitchen-sink/TestMultiplayer1Dummy.gd" id="1_o3lgk"] | ||
|
||
[node name="TestMultiplayer1Dummy" type="MarginContainer"] | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
theme_override_constants/margin_left = 5 | ||
theme_override_constants/margin_top = 5 | ||
theme_override_constants/margin_right = 5 | ||
theme_override_constants/margin_bottom = 5 | ||
script = ExtResource("1_o3lgk") | ||
|
||
[node name="VBoxContainer" type="VBoxContainer" parent="."] | ||
layout_mode = 2 | ||
|
||
[node name="Label" type="Label" parent="VBoxContainer"] | ||
layout_mode = 2 | ||
text = "Dummy Multiplayer Test | ||
Press \"Host\" to start a server | ||
Press \"Join (Client 1)\" to start the first client | ||
Press \"Join (Client 2)\" to start the second client | ||
Press \"Show logs\" to display the SxDebugTools Log panel. | ||
Press \"Show scene tree\" to display the SxDebugTools Scene Tree panel. | ||
" | ||
horizontal_alignment = 1 | ||
vertical_alignment = 1 | ||
|
||
[node name="HostButton" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Host" | ||
|
||
[node name="JoinClient1Button" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Join (Client 1)" | ||
|
||
[node name="JoinClient2Button" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Join (Client 2)" | ||
|
||
[node name="ShowLogs" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Show logs" | ||
|
||
[node name="ShowTree" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Show scene tree" |
Oops, something went wrong.