Split client and server

This commit is contained in:
2024-01-24 00:09:50 +01:00
parent 532a1faa21
commit 26c52a00b3
59 changed files with 335 additions and 142 deletions

View File

@ -0,0 +1,8 @@
class_name DebugLabel
extends Control
var text : String :
get:
return get_child(1).text
set(value):
get_child(1).text = value

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://cch67vqpsmtej"]
[ext_resource type="Script" path="res://ui/debug/DebugLabel.gd" id="1_xfly0"]
[ext_resource type="Script" path="res://ui/debug/DebugLabelText.gd" id="2_i4ix0"]
[node name="Container" type="HBoxContainer"]
script = ExtResource("1_xfly0")
[node name="Text" type="Label" parent="."]
layout_mode = 2
text = ":"
script = ExtResource("2_i4ix0")
[node name="Value" type="Label" parent="."]
layout_mode = 2

View File

@ -0,0 +1,5 @@
@tool
extends Label
func _ready():
text = get_parent().name + ":"

View File

@ -0,0 +1,4 @@
extends DebugLabel
func _process(_delta):
text = str(Engine.get_frames_per_second())

View File

@ -0,0 +1,6 @@
extends DebugLabel
@export var monitor: Performance.Monitor
func _process(_delta):
text = str(Performance.get_monitor(monitor))

View File

@ -0,0 +1,7 @@
extends DebugLabel
func _ready():
%Ping.connect("changed", on_ping_changed)
func on_ping_changed(ping):
text = str(snapped(ping * 1000, 1)) + " ms"

View File

@ -0,0 +1,7 @@
extends DebugLabel
func _process(_delta):
if Global.player == null:
return
text = str(Global.player.global_position)

View File

@ -0,0 +1,7 @@
extends DebugLabel
func _process(_delta):
if Global.player == null:
return
text = str(Global.player.velocity)