feat: 添加浮动文字,展示伤害和躲避
This commit is contained in:
+3
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user