feat: 添加浮动文字,展示伤害和躲避

This commit is contained in:
luke358
2026-05-18 16:53:50 +08:00
parent 66452f1072
commit 883a9b4c05
8 changed files with 103 additions and 7 deletions
+3 -3
View File
@@ -23,13 +23,13 @@ func _on_hurtbox_component_on_damaged(hitbox: HitboxComponent) -> void:
var blocked := Global.get_chance_success(stats.block_chance / 100)
if blocked:
print("Blocked!")
#print("Blocked!")
Global.on_create_block_text.emit(self)
return
set_flash_material()
health_component.take_damage(hitbox.damage)
print("%s: %d" % [name, health_component.current_health] )
Global.on_create_damage_text.emit(self, hitbox)
func _on_flash_timer_timeout() -> void: