fixup
This commit is contained in:
parent
04cec5149a
commit
dc7e309ef2
|
@ -10,9 +10,6 @@ func jump():
|
||||||
var on_floor = $"../OnFootPhysics/Floor".is_on_floor
|
var on_floor = $"../OnFootPhysics/Floor".is_on_floor
|
||||||
var jump_intent = $"../MovementInput".jump_intent
|
var jump_intent = $"../MovementInput".jump_intent
|
||||||
|
|
||||||
measure = min(measure, phys.velocity.y)
|
|
||||||
print(measure)
|
|
||||||
|
|
||||||
if jump_intent and not on_floor and not played_takeoff:
|
if jump_intent and not on_floor and not played_takeoff:
|
||||||
$Jump.play()
|
$Jump.play()
|
||||||
played_takeoff = true
|
played_takeoff = true
|
||||||
|
|
|
@ -95,12 +95,13 @@ func process_falling():
|
||||||
if not $Floor.is_on_floor:
|
if not $Floor.is_on_floor:
|
||||||
is_falling = true
|
is_falling = true
|
||||||
just_landed = false
|
just_landed = false
|
||||||
|
just_landed_medium = false
|
||||||
just_landed_terminally = false
|
just_landed_terminally = false
|
||||||
if velocity.y <= 5.0:
|
if velocity.y <= -5.0:
|
||||||
is_falling_medium = true
|
is_falling_medium = true
|
||||||
if is_falling_velocity_terminal():
|
if is_falling_velocity_terminal():
|
||||||
is_falling_terminally = true
|
is_falling_terminally = true
|
||||||
return
|
return
|
||||||
just_landed = is_falling
|
just_landed = is_falling
|
||||||
just_landed_medium = is_falling_medium
|
just_landed_medium = is_falling_medium
|
||||||
just_landed_terminally = is_falling_terminally
|
just_landed_terminally = is_falling_terminally
|
||||||
|
|
Loading…
Reference in New Issue