weapon SFX
This commit is contained in:
parent
afc0aab441
commit
2f30c9f04b
16 changed files with 132 additions and 11 deletions
|
|
@ -107,19 +107,11 @@ func _process_aim() -> void:
|
|||
%Reticle.position = to_mouse_pos
|
||||
|
||||
func _process_shoot(delta: float) -> void:
|
||||
var clock_mul := 1.
|
||||
|
||||
# match state:
|
||||
# State.DASHING: clock_mul = 2.5
|
||||
# State.LOCKED: clock_mul = 2.5
|
||||
|
||||
if gun_index == MORTAR_IDX and Input.is_action_pressed("fire"):
|
||||
speed_mul = exp_lerp(speed_mul, 0.25, 5, delta)
|
||||
else:
|
||||
speed_mul = exp_lerp(speed_mul, 1., 5, delta)
|
||||
|
||||
|
||||
gun.fire_clock -= delta * clock_mul
|
||||
if Input.is_action_pressed("fire") and gun.fire_clock <= 0.:
|
||||
gun.fire(aim_angle)
|
||||
|
||||
|
|
@ -139,7 +131,7 @@ func _process_cam_shake(delta: float) -> void:
|
|||
camera_transform.basis.x * x + \
|
||||
camera_transform.basis.y * y
|
||||
|
||||
%Camera3D.position += v * .75
|
||||
%Camera3D.position += v * 1.5
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if not Level.is_active(): return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue