mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器系统): 重构武器升华动画及交互逻辑
- 将sublimateToggled信号拆分为sublimateOpened和sublimateClosed - 添加武器卡片的hide/show动画效果 - 移除MuyangDog角色中的Volcano武器 - 重置EntityBase中钻石的初始数量为0 - 为CategoryStore添加@tool注解
This commit is contained in:
@@ -7,6 +7,18 @@ func beforeOpen(_args: Array = []):
|
||||
for weapon in UIState.player.weapons:
|
||||
weapon.show()
|
||||
weapon.rebuildInfo()
|
||||
weapon.sublimateOpened.connect(
|
||||
func():
|
||||
for w in UIState.player.weapons:
|
||||
if w != weapon:
|
||||
w.animator.play("hide")
|
||||
)
|
||||
weapon.sublimateClosed.connect(
|
||||
func():
|
||||
for w in UIState.player.weapons:
|
||||
if w != weapon:
|
||||
w.animator.play("show")
|
||||
)
|
||||
UIState.player.weaponStore.remove_child(weapon)
|
||||
box.add_child(weapon)
|
||||
func afterClose():
|
||||
|
||||
@@ -68,7 +68,7 @@ var inventory = {
|
||||
ItemStore.ItemType.BEACHBALL: 0,
|
||||
ItemStore.ItemType.SOUL: 0,
|
||||
ItemStore.ItemType.CRYSTAL: 0,
|
||||
ItemStore.ItemType.DIAMOND: 10
|
||||
ItemStore.ItemType.DIAMOND: 0
|
||||
}
|
||||
var inventoryMax = {
|
||||
ItemStore.ItemType.BASEBALL: INF, # 无限
|
||||
|
||||
@@ -9,7 +9,8 @@ enum EmitType {
|
||||
HOLD_LOOP
|
||||
}
|
||||
|
||||
signal sublimateToggled(on: bool)
|
||||
signal sublimateOpened()
|
||||
signal sublimateClosed()
|
||||
|
||||
@export var avatarTexture: Texture2D = null
|
||||
@export var displayName: String = "未命名武器"
|
||||
@@ -71,9 +72,10 @@ func _ready():
|
||||
func(on: bool):
|
||||
if on:
|
||||
animator.play("openSub")
|
||||
sublimateOpened.emit()
|
||||
else:
|
||||
animator.play("closeSub")
|
||||
sublimateToggled.emit(on)
|
||||
sublimateClosed.emit()
|
||||
)
|
||||
autoUpdateBtn.toggled.connect(
|
||||
func(on: bool):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@tool
|
||||
class_name CategoryStore
|
||||
|
||||
enum Quality {
|
||||
|
||||
Reference in New Issue
Block a user