WIP: got kicked by enemy

This commit is contained in:
2026-04-22 23:18:35 +03:00
parent 5f5f0f54f1
commit 5ff0b1108e
2 changed files with 45 additions and 0 deletions
+7
View File
@@ -189,6 +189,13 @@ func _squish_effect() -> void:
tw.tween_property(mesh_node, "scale", Vector3(1.3, 0.55, 1.3), 0.07)
tw.tween_property(mesh_node, "scale", Vector3(1.0, 1.0, 1.0), 0.18)
func receive_kick(direction: Vector3, force: float) -> void:
if not is_alive or invincible_timer > 0.0:
return
velocity.x = direction.x * force
velocity.z = direction.z * force
invincible_timer = IFRAMES_DURATION * 0.5
func take_damage(amount: int) -> void:
if not is_alive or invincible_timer > 0.0:
return