WIP: Spawn bullets on the server and sync them
This commit is contained in:
18
scenes/maps/hud.gd
Normal file
18
scenes/maps/hud.gd
Normal 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
|
Reference in New Issue
Block a user