mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-14 16:04:50 +00:00
🐛 Fix multiplayer client respawn logic
This commit is contained in:
parent
0ffcc397ec
commit
6d9ec29840
5 changed files with 121 additions and 93 deletions
|
|
@ -4,17 +4,21 @@
|
|||
script/source = "extends CanvasLayer
|
||||
class_name HUD
|
||||
|
||||
@onready var health_bar = $HealthBar
|
||||
@onready var energy_bar = $EnergyBar
|
||||
@onready var _health_bar = $HealthBar
|
||||
@onready var _energy_bar = $EnergyBar
|
||||
|
||||
func _update_energy_label(energy):
|
||||
energy_bar.value = energy
|
||||
func _ready():
|
||||
_update_health_label(100)
|
||||
_update_energy_label(100)
|
||||
|
||||
func _update_energy_label(energy) -> void:
|
||||
_energy_bar.value = energy
|
||||
|
||||
func _on_energy_changed(new_energy) -> void:
|
||||
_update_energy_label(new_energy)
|
||||
|
||||
func _update_health_label(health):
|
||||
health_bar.value = health
|
||||
func _update_health_label(health) -> void:
|
||||
_health_bar.value = health
|
||||
|
||||
func _on_health_changed(new_health) -> void:
|
||||
_update_health_label(new_health)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue