Skip to content

Commit 5b10e1d

Browse files
committed
chore: who am i.
1 parent 02e819e commit 5b10e1d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

demo/client/scenes/Init.tscn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
[gd_scene load_steps=2 format=3 uid="uid://e1hnqdibrys"]
1+
[gd_scene load_steps=3 format=3 uid="uid://e1hnqdibrys"]
22

33
[ext_resource type="Script" path="res://scripts/network_manager.gd" id="1_jbx0p"]
4+
[ext_resource type="Script" path="res://scripts/who_am_i.gd" id="2_20yil"]
45

56
[node name="Init" type="Node"]
67

@@ -26,3 +27,4 @@ offset_bottom = 23.0
2627
grow_horizontal = 2
2728
text = "Hello World!"
2829
horizontal_alignment = 1
30+
script = ExtResource("2_20yil")

demo/client/scripts/who_am_i.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extends Label
2+
3+
# Called when the node enters the scene tree for the first time.
4+
func _process(_delta: float) -> void:
5+
self.text = "[%s] %s" % ["SERVER" if OS.has_feature("dedicated_server") else "CLIENT", multiplayer.get_unique_id()]

0 commit comments

Comments
 (0)