Interface ISpinnerHandler
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Strategy interface that drives spinning behavior for ModularSpinner. Provides geometry, timing and element control APIs used by concrete handlers.
public interface ISpinnerHandler
Properties
elementStartPosition
Initial layout policy for elements.
ElementStartPosition elementStartPosition { get; }
Property Value
elementsAmount
Number of managed spinning elements.
int elementsAmount { get; }
Property Value
- int
facingDirection
Facing direction used when isLookForward is true.
FacingDirection facingDirection { get; }
Property Value
isClockwise
Whether rotation is clockwise.
bool isClockwise { get; }
Property Value
- bool
isContinuousSpin
Whether continuous spinning mode is enabled.
bool isContinuousSpin { get; }
Property Value
- bool
isLookForward
Whether elements rotate to face forward along their path.
bool isLookForward { get; }
Property Value
- bool
isSimpleDelay
Whether a simplified delay model is active.
bool isSimpleDelay { get; }
Property Value
- bool
movementCurve
Easing curve for element movement.
AnimationCurve movementCurve { get; }
Property Value
- AnimationCurve
rotationDelay
Delay between starts of subsequent elements.
float rotationDelay { get; }
Property Value
- float
rotationTime
Duration (seconds) for one full rotation.
float rotationTime { get; }
Property Value
- float
size
Computed layout size used for positioning.
Vector2 size { get; }
Property Value
- Vector2
startAngle
Base rotation angle in degrees.
int startAngle { get; }
Property Value
- int
Methods
CalculateAreaSize()
Calculates layout size used for positioning.
void CalculateAreaSize()
GetFirstCompletedElementSpeed()
Returns rotation speed of the first element that completed rotation.
float GetFirstCompletedElementSpeed()
Returns
- float
GetSpinner(int)
Gets the wrapper spinner for an element by index.
UISpinner GetSpinner(int index)
Parameters
indexintElement index.
Returns
HasFirstElementCompletedRotation()
Checks whether any element has completed its first rotation.
bool HasFirstElementCompletedRotation()
Returns
- bool
InitSpinners()
Creates/initializes UISpinner wrappers for each element.
void InitSpinners()
Initialize()
Initializes internal state and places elements.
void Initialize()
MoveTangently(int)
Moves an element along the tangent of the path (per frame update).
void MoveTangently(int index)
Parameters
indexint
SetElementsStartPosition()
Places elements to their start positions.
void SetElementsStartPosition()
Spin()
Starts a spin sequence according to handler policy.
void Spin()
StartSynchronizedContinuousSpin(float)
Starts continuous spinning for all elements with the provided synchronized speed.
void StartSynchronizedContinuousSpin(float synchronizedSpeed)
Parameters
synchronizedSpeedfloatSpeed value to apply to all elements.
Stop()
Stops the current spin.
void Stop()
StopImmediate()
Stops immediately without transitions.
void StopImmediate()