feat: 添加升级卡和样式
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user