level + enemy spawner refactor
This commit is contained in:
parent
ebdb9c7074
commit
2cc3eaa859
15 changed files with 942 additions and 93 deletions
|
|
@ -52,7 +52,7 @@ func exp_lerp(a: Variant, b: Variant, decay: float, dt: float) -> Variant:
|
|||
func _process_movement(delta: float) -> void:
|
||||
var input = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
input.normalized()
|
||||
var mul := 5. if DebugMenu.high_speed_hack else 1.
|
||||
var mul := 10. if DebugMenu.high_speed_hack else 1.
|
||||
var desired_velocity = Vector3(input.x, 0., input.y) * MOVE_SPEED * mul
|
||||
velocity = exp_lerp(velocity, desired_velocity, 20, delta)
|
||||
move_and_slide()
|
||||
|
|
@ -103,6 +103,10 @@ func _process_shoot(delta: float) -> void:
|
|||
func _process_cam_shake(delta: float) -> void:
|
||||
shake_duration -= delta
|
||||
%Camera3D.transform = camera_transform
|
||||
|
||||
if DebugMenu.zoomed_out:
|
||||
%Camera3D.position += %Camera3D.basis.z * 20.
|
||||
|
||||
if shake_duration <= 0:
|
||||
return
|
||||
|
||||
|
|
@ -142,4 +146,5 @@ func damage(damager: Node3D) -> void:
|
|||
shake_duration = .25
|
||||
|
||||
if health == 0:
|
||||
get_tree().reload_current_scene()
|
||||
pass
|
||||
#get_tree().reload_current_scene()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue