mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat: 新增角色系统及基础功能实现
新增HCN、Lynx和MuyangDog三个可玩角色及其相关资源 实现角色选择界面和角色属性系统 重构玩家生成逻辑以支持角色选择 优化角色卡片UI显示效果
This commit is contained in:
@@ -5,6 +5,7 @@ class_name CharacterCard
|
||||
signal select()
|
||||
|
||||
@export var displayName: String = "Unknown Character"
|
||||
@export var slogan: String = "Slogan"
|
||||
@export var avatar: Texture2D = null
|
||||
@export_multiline var description: String = ""
|
||||
@export var fields: Array[FieldStore.Entity] = []
|
||||
@@ -14,6 +15,7 @@ signal select()
|
||||
|
||||
@onready var avatarTexture: TextureRect = $%avatarTexture
|
||||
@onready var nameLebel: Label = $%nameLabel
|
||||
@onready var sloganLabel: Label = $%sloganLabel
|
||||
@onready var descriptionLabel: Label = $%descriptionLabel
|
||||
@onready var fieldsBox: Control = $%fields
|
||||
@onready var animator: AnimationPlayer = $%animator
|
||||
@@ -40,6 +42,7 @@ func _process(_delta):
|
||||
func rebuildInfo():
|
||||
avatarTexture.texture = avatar
|
||||
nameLebel.text = displayName
|
||||
sloganLabel.text = "“%s”" % slogan
|
||||
descriptionLabel.text = description
|
||||
for child in fieldsBox.get_children():
|
||||
fieldsBox.remove_child(child)
|
||||
|
||||
Reference in New Issue
Block a user