mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 11:47:13 +08:00
feat: 添加鸡蛋资源并实现字段显示优势功能
- 新增鸡蛋资源文件及导入配置 - 在FieldShow组件中添加showAdvantage属性控制优势显示 - 修正武器类默认名称错误 - 添加entityNegativeFields数组存储负数字段
This commit is contained in:
@@ -8,6 +8,7 @@ class_name FieldShow
|
||||
@export var entity: EntityBase = null
|
||||
@export var useViewCast: bool = false
|
||||
@export var maxed: bool = false
|
||||
@export var showAdvantage: bool = false
|
||||
|
||||
@onready var nameLabel: Label = $"%name"
|
||||
@onready var valueLabel: Label = $"%value"
|
||||
@@ -33,6 +34,11 @@ func _ready():
|
||||
if maxed:
|
||||
valueLabel.label_settings.font_color = Color(1, 0.3, 0.3)
|
||||
valueLabel.text = "MAX%s" % valueLabel.text
|
||||
elif showAdvantage:
|
||||
if field in FieldStore.entityNegativeFields:
|
||||
valueLabel.label_settings.font_color = Color.RED if value > 0 else Color.GREEN
|
||||
else:
|
||||
valueLabel.label_settings.font_color = Color.GREEN if value > 0 else Color.RED
|
||||
else:
|
||||
valueLabel.label_settings.font_color = Color(1, 1, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user