1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-23 03:52:30 +08:00

feat(伤害系统): 添加完美闪避机制和对应显示效果

- 新增完美闪避判定逻辑,当移动速度达到阈值时触发
- 添加黄色字体颜色用于显示完美闪避文本
- 完美闪避时获得双倍能量奖励并显示"PERFECT MISS"
- 普通闪避仍显示"MISS"并给予基础能量奖励
This commit is contained in:
2025-09-07 14:23:58 +08:00
parent 6d469d739a
commit 49172a0088
2 changed files with 15 additions and 4 deletions
+7 -2
View File
@@ -6,6 +6,7 @@ class_name DamageLabel
@export var color1: Color = Color(1, 0, 0, 1)
@export var color2: Color = Color(0, 1, 0, 1)
@export var color3: Color = Color(0.5, 0.5, 0.5, 1)
@export var color4: Color = Color.YELLOW
@onready var label: Label = $"%label"
@onready var animator: AnimationPlayer = $"%animator"
@@ -21,8 +22,12 @@ func _ready():
label.label_settings.font_color = color2
label.text = "+%s%s" % [damageValue, "!!!" if crit else ""]
else:
label.label_settings.font_color = color3
label.text = "MISS"
if crit:
label.label_settings.font_color = color4
label.text = "PERFECT MISS"
else:
label.label_settings.font_color = color3
label.text = "MISS"
animator.play("show")
await animator.animation_finished
queue_free()