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 77f3d5e4a1 feat(技能图标): 改进冷却进度视觉效果和样式
- 移除进度值的clamp限制,允许超出范围效果
- 为冷却进度着色器添加边缘高光和拖尾效果
- 调整图标容器圆角和最小尺寸
- 更新材质参数以支持新的着色器效果
2025-09-06 16:40:25 +08:00

15 lines
470 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 = weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown
textureRect.material.set_shader_parameter("progress", progress)