mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
e4d04ff599
- 新增 SkillIcon.gd 脚本用于管理武器技能图标显示 - 修改 CooldownProgress.gdshader 增加背景透明度参数 - 更新 CooldownTimer.gd 添加时间计算方法 - 重构 SkillIconBase.tscn 场景以支持新功能
11 lines
351 B
GDScript
11 lines
351 B
GDScript
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))
|