feat: 添加升级卡和样式

This commit is contained in:
luke358
2026-05-20 21:24:47 +08:00
parent 4a3cd81ff7
commit 2ba69606ee
8 changed files with 134 additions and 1 deletions
+12 -1
View File
@@ -7,6 +7,7 @@ class_name StatsContainer
@onready var damage_label: Label = %DamageLabel
@onready var luck_label: Label = %LuckLabel
@onready var speed_label: Label = %SpeedLabel
@onready var block_label: Label = %BlockLabel
@onready var harvesting_label: Label = %HarvestingLabel
# Called when the node enters the scene tree for the first time.
@@ -16,4 +17,14 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
if not is_instance_valid(Global.player):
return
health_label.text = str(Global.player.stats.health)
hp_regen_label.text = str(Global.player.stats.hp_regen)
life_steal_label.text = str(Global.player.stats.life_steal) + "%"
damage_label.text = str(Global.player.stats.damage)
luck_label.text = str(Global.player.stats.luck)
speed_label.text = str(Global.player.stats.speed)
block_label.text = str(Global.player.stats.block_chance) + "%"
harvesting_label.text = str(Global.player.stats.harvesting)