1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-01 08:51:53 +08:00

feat(技能图标): 添加技能冷却显示功能

- 新增 SkillIcon.gd 脚本用于管理武器技能图标显示
- 修改 CooldownProgress.gdshader 增加背景透明度参数
- 更新 CooldownTimer.gd 添加时间计算方法
- 重构 SkillIconBase.tscn 场景以支持新功能
This commit is contained in:
2025-09-06 15:04:32 +08:00
parent 41198cb51a
commit e4d04ff599
4 changed files with 22 additions and 5 deletions
+10
View File
@@ -0,0 +1,10 @@
extends PanelContainer
@export var weapon: Weapon = null;
@onready var textureRect = $"%texture"
func _physics_process(_delta):
if is_instance_valid(weapon):
textureRect.texture = weapon.avatarTexture
textureRect.material.set_shader_parameter("progress", clamp(weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown, 0, 1))