Smooth boosted fleet travel
This commit is contained in:
parent
e5439f7183
commit
fd792e8b63
12 changed files with 90 additions and 8 deletions
|
|
@ -67,14 +67,14 @@ func _process(delta: float) -> bool:
|
|||
return _fail("the Propulser that dashed did not enter cooldown")
|
||||
# The burst should cover substantially more than a linear quarter of
|
||||
# its distance at a quarter of its duration, then ease into its stop.
|
||||
fleet.set_process(false)
|
||||
fleet.set_physics_process(false)
|
||||
fleet._advance_dash(fleet.dash_duration * 0.25)
|
||||
var early_distance: float = fleet.get_centroid().distance_to(first_origin)
|
||||
if early_distance <= DASH_DISTANCE * 0.45 \
|
||||
or early_distance >= DASH_DISTANCE * 0.7:
|
||||
return _fail("dash has no useful ease-out curve (quarter-time distance %.1f)" \
|
||||
% early_distance)
|
||||
fleet.set_process(true)
|
||||
fleet.set_physics_process(true)
|
||||
dash._process(0.0)
|
||||
if not main.get_node("UI/DashButton").enabled:
|
||||
return _fail("one cooling Propulser disabled a second ready one")
|
||||
|
|
|
|||
Loading…
Reference in a new issue