mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(角色卡片): 添加新角色卡片资源并优化显示逻辑
添加猞猁、牧羊犬和氰化氢的角色卡片资源 优化卡片选中状态的动画显示逻辑 调整卡片样式和主题配置 移除冗余的panel节点引用
This commit is contained in:
@@ -210,3 +210,7 @@ func rebuildInfo():
|
||||
getCurrentSelectedCharacter().animator.play("show")
|
||||
)
|
||||
charactersBox.add_child(card)
|
||||
if selectedCharacter == card.name:
|
||||
card.animator.play("show")
|
||||
else:
|
||||
card.animator.play("hide")
|
||||
|
||||
@@ -12,7 +12,6 @@ signal select()
|
||||
@export var clickToRebuild: bool = false
|
||||
@export var borderOpacity: float = 0
|
||||
|
||||
@onready var panel: PanelContainer = $%panel
|
||||
@onready var avatarTexture: TextureRect = $%avatarTexture
|
||||
@onready var nameLebel: Label = $%nameLabel
|
||||
@onready var descriptionLabel: Label = $%descriptionLabel
|
||||
@@ -20,10 +19,10 @@ signal select()
|
||||
@onready var animator: AnimationPlayer = $%animator
|
||||
|
||||
var watcher: Watcher = Watcher.new(false)
|
||||
@onready var panelStyleBox: StyleBoxFlat = panel.get_theme_stylebox("panel").duplicate()
|
||||
@onready var panelStyleBox: StyleBoxFlat = get_theme_stylebox("panel").duplicate()
|
||||
|
||||
func _ready():
|
||||
panel.add_theme_stylebox_override("panel", panelStyleBox)
|
||||
add_theme_stylebox_override("panel", panelStyleBox)
|
||||
watcher.changed.connect(rebuildInfo)
|
||||
gui_input.connect(
|
||||
func(event):
|
||||
|
||||
Reference in New Issue
Block a user