Made crates able to be stood on, fixed player character collision issues but now the character seems small..?

noticed bugs: killing an enemy as you die crashes the game, ear wind needs to be inaudible when standing still, recoil camera still sucks
This commit is contained in:
Derek
2024-10-05 00:36:55 -05:00
parent e0c0687c4f
commit 21b82f3d5c
4 changed files with 12 additions and 16 deletions

View File

@@ -130,14 +130,13 @@ func _physics_process(delta):
if !dead:
# Add the gravity.
if not is_on_floor():
velocity.y -= gravity * delta
if velocity.y >= .1:
moving_fast = true
else:
ear_wind.stop()
if is_on_floor():
double_jump = true
air_dash = MAX_AIR_DASH
else:
velocity.y -= gravity * delta
if abs(velocity.y) >= .1:
moving_fast = true
# Handle jump.
if Input.is_action_just_pressed("jump") and is_on_floor() and !is_climbing:
@@ -194,12 +193,10 @@ func _physics_process(delta):
health_indicator.color = lerp(Color(0.471, 0, 0, 0), Color(0.471, 0, 0, .25),health_opacity)
# Moving Fast Sound
#initiate fast movement
if velocity.y >= (JUMP_VELOCITY * 1.1) and !is_climbing:
ear_wind.play()
#initiate fast movement -- may be done with this block
#change sounds with speed
if moving_fast:
var wind_volume = clamp( velocity.length() - 20 ,-20,0)
var wind_volume = clamp( velocity.length() - 20 ,-20,10)
ear_wind.volume_db = wind_volume
#reset at apex
@@ -213,7 +210,6 @@ func _physics_process(delta):
var land_volume = clamp( moving_fast_top_speed - 20 ,-10,0)
land_sound.volume_db = land_volume
land_sound.play()
ear_wind.stop()
moving_fast_top_speed = 0.0
moving_fast = false