This commit is contained in:
MarcEricMartel
2022-10-12 08:38:28 -04:00
parent d54d58c736
commit da7860f05f
2 changed files with 21 additions and 18 deletions

View File

@@ -115,6 +115,20 @@ func _physics_process(delta):
else:
isSlap = false;
if (chargeSlap):
slap += delta * 1.5;
else:
slap -= delta * 8.0;
slap = clamp(slap, 0.0, 1.0)
slap_gauge.fill = slap
if !isSlap and can_slap:
slap_animator.seek(slap, true)
if isSlap:
slap_animator.playback_speed = 20
slap_animator.play()
slap_gauge.fill = slap;
slap_gauge.kill = slapkill;
if isSlap:
if slap >= slapkill:
@@ -126,18 +140,6 @@ func _physics_process(delta):
hitbox.slap_level = slap
hitbox.slap_kill = slapkill
hitbox.slap_vector = point_to.get_global_transform().origin - camera.get_global_transform().origin
if (chargeSlap):
slap += delta * 1.5;
else:
slap -= delta * 8.0;
slap = clamp(slap, 0.0, 1.0)
slap_gauge.fill = slap
slap_animator.seek(slap, true)
slap_gauge.fill = slap;
slap_gauge.kill = slapkill;
direction = direction.normalized()