1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/SkillIcon.gd
T
fallingshrimp eece417834 fix: 调整角色属性和技能图标逻辑
将Chick角色的最大生命值从2000降低至1500以平衡游戏难度
修改EntityBase的能量恢复为随机范围(0.01-0.15)增加变化性
更新SkillIcon进度计算,加入能量限制条件防止显示异常
2025-09-07 14:59:56 +08:00

15 lines
518 B
GDScript

extends PanelContainer
class_name SkillIcon
@export var weapon: Weapon = null;
@onready var textureRect: TextureRect = $"%texture"
func _ready():
textureRect.material = textureRect.material.duplicate()
func _physics_process(_delta):
if is_instance_valid(weapon):
textureRect.texture = weapon.avatarTexture
var progress = min(weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown, UIState.player.energy / weapon.needEnergy)
textureRect.material.set_shader_parameter("progress", progress)