feat: 添加生命值回复事件,组件,浮动文字
This commit is contained in:
@@ -107,3 +107,12 @@ func _on_dash_timer_timeout() -> void:
|
||||
move_dir = Vector2.ZERO
|
||||
collision.set_deferred("disabled", false)
|
||||
dash_cooldown_timer.start()
|
||||
|
||||
|
||||
func _on_hp_regen_timer_timeout() -> void:
|
||||
if health_component.current_health <= 0:
|
||||
return
|
||||
if health_component.current_health < stats.health:
|
||||
var heal := stats.hp_regen
|
||||
health_component.heal(heal)
|
||||
Global.on_create_heal_text.emit(self, heal)
|
||||
|
||||
Reference in New Issue
Block a user