WIP: Spawn bullets on the server and sync them

This commit is contained in:
2025-01-26 23:05:21 +01:00
parent c7c577233b
commit 5c360932fd
3 changed files with 74 additions and 1 deletions

18
scenes/maps/hud.gd Normal file
View File

@ -0,0 +1,18 @@
extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@onready var health_indicator: Label = $HealthIndicator
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
var root := get_tree().get_root()
var id := str(multiplayer.get_unique_id())
var placeholder: Node3D = root.find_child("*_" + id)
if placeholder:
health_indicator.text = placeholder.health
pass