mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(武器系统): 添加武器来源显示功能并优化光标刀碰撞
- 在武器卡片中添加来源显示标签和数组字段 - 将光标刀的碰撞形状从矩形改为线段 - 为光标刀添加命中时的击退效果 - 优化场景文件格式和节点唯一ID
This commit is contained in:
@@ -17,6 +17,7 @@ class_name Weapon
|
||||
"atk": FieldStore.DataType.INTEGER
|
||||
}
|
||||
@export_multiline var descriptionTemplate: String = "造成$atk点伤害。"
|
||||
@export var sources: Array[String] = []
|
||||
@export var needEnergy: float = 0
|
||||
@export var cooldown: float = 100
|
||||
@export var debugRebuild: bool = false
|
||||
@@ -24,6 +25,7 @@ class_name Weapon
|
||||
|
||||
@onready var avatarRect: TextureRect = $"%avatar"
|
||||
@onready var nameLabel: WeaponName = $"%name"
|
||||
@onready var sourceLabel: Label = $"%source"
|
||||
@onready var energyLabel: Label = $"%energy"
|
||||
@onready var beachball: ItemShow = $"%beachball"
|
||||
@onready var soul: ItemShow = $"%soul"
|
||||
@@ -121,6 +123,7 @@ func rebuildInfo(showNext: bool = false):
|
||||
nameLabel.typeTopic = typeTopic
|
||||
nameLabel.soulLevel = soulLevel
|
||||
nameLabel.level = level
|
||||
sourceLabel.text = " × ".join(sources)
|
||||
energyLabel.text = "%.1f" % needEnergy
|
||||
beachball.count = costBeachball
|
||||
soul.count = soulLevel
|
||||
|
||||
Reference in New Issue
Block a user