WIP: got kicked by enemy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user