Class SplineController.SplineSwitcher
- Namespace
- FluffyUnderware.Curvy.Controllers
protected class SplineController.SplineSwitcher
- Inheritance
-
SplineController.SplineSwitcher
Properties
Direction
The controller's current Direction on the Spline. Its value is invalid if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public MovementDirection Direction { get; set; }
Property Value
Duration
The duration of the the current spline switching. Its value is invalid if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public float Duration { get; set; }
Property Value
IsSwitching
Gets whether the Controller is switching splines
public bool IsSwitching { get; set; }
Property Value
Progress
The ratio (value between 0 and 1) expressing the progress of the current spline switch. 0 means the switch just started, 1 means the switch ended. Its value is 0 if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public float Progress { get; }
Property Value
Spline
The spline to which the controller is switching. Its value is invalid if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public CurvySpline Spline { get; set; }
Property Value
StartTime
The time at which the current spline switching started. Its value is invalid if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public float StartTime { get; set; }
Property Value
Tf
The controller's current TF on the Spline. Its value is invalid if no spline switching is in progress. Spline switching is done by calling Start(CurvySpline, float, float, MovementDirection)
public float Tf { get; set; }
Property Value
Methods
Advance(CurvySpline, MoveModeEnum, float, CurvyClamping)
public void Advance(CurvySpline spline, CurvyController.MoveModeEnum moveMode, float distance, CurvyClamping clamping)
Parameters
splineCurvySplineSpline on witch advancing
moveModeCurvyController.MoveModeEnummovement type
distancefloatdistance of the advance. Its unit depends on the value of
moveModeclampingCurvyClampingDefines the behaviour when reaching a spline end
Start(CurvySpline, float, float, MovementDirection)
Start a spline switch. Should be called only on non stopped controllers.
public void Start(CurvySpline spline, float tf, float duration, MovementDirection direction)
Parameters
splineCurvySplinethe target spline to switch to
tffloatthe target TF
durationfloatduration of the switch phase
directionMovementDirection
Remarks
While switching is not finished, movement on destination spline will not fire events nor consider connections
Stop()
Stop the current spline switch
public void Stop()