feat: implement player movement controller and movement state machine system
This commit is contained in:
@@ -94,11 +94,14 @@ func _physics_process(delta: float) -> void:
|
||||
_try_start_grapple()
|
||||
|
||||
if is_grapple_shooting:
|
||||
grapple_shoot_time += delta
|
||||
if grapple_shoot_time >= grapple_travel_time:
|
||||
if not input_grapple:
|
||||
is_grapple_shooting = false
|
||||
movement_event.emit("grapple_latch", {})
|
||||
switch_to("grapple")
|
||||
else:
|
||||
grapple_shoot_time += delta
|
||||
if grapple_shoot_time >= grapple_travel_time:
|
||||
is_grapple_shooting = false
|
||||
movement_event.emit("grapple_latch", {})
|
||||
switch_to("grapple")
|
||||
|
||||
# Manage global crouch state
|
||||
var want_crouch = input_crouch
|
||||
|
||||
Reference in New Issue
Block a user