mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(WeaponCard): 添加升华按钮动画效果
- 为升华按钮添加开合动画效果 - 更新TextSwitchButton以支持动态文本切换 - 在Weapon.gd中添加动画播放逻辑
This commit is contained in:
@@ -41,6 +41,7 @@ enum EmitType {
|
||||
@onready var sounds: Node2D = $%sounds
|
||||
@onready var moveLeftBtn: Button = $%moveleft
|
||||
@onready var moveRightBtn: Button = $%moveright
|
||||
@onready var animator: AnimationPlayer = $%animator
|
||||
|
||||
@onready var autoUpdateBtn: Button = $%autoUpdateBtn
|
||||
@onready var onceUpdateBtn: Button = $%onceUpdateBtn
|
||||
@@ -48,6 +49,7 @@ enum EmitType {
|
||||
@onready var extractBtn: Button = $%extractBtn
|
||||
@onready var inlayBtn: Button = $%inlayBtn
|
||||
|
||||
@onready var sublimateBtn: Button = $%sublimateBtn
|
||||
@onready var sublimateOptionsBox: Control = $%sublimateOptions
|
||||
|
||||
var cooldownTimer: CooldownTimer = null
|
||||
@@ -63,6 +65,13 @@ func _ready():
|
||||
cooldownTimer = CooldownTimer.new()
|
||||
cooldownTimer.cooldown = cooldown
|
||||
originalStore = store
|
||||
sublimateBtn.toggled.connect(
|
||||
func(on: bool):
|
||||
if on:
|
||||
animator.play("openSub")
|
||||
else:
|
||||
animator.play("closeSub")
|
||||
)
|
||||
autoUpdateBtn.toggled.connect(
|
||||
func(on: bool):
|
||||
autoUpdate = on
|
||||
|
||||
Reference in New Issue
Block a user