Interface DragGesture.IMotionStrategy
- Namespace
- Lime
- Assembly
- Lime.dll
Defines a motion strategy.
public interface DragGesture.IMotionStrategy
Properties
Duration
float Duration { get; }
Property Value
Position
Vector2 Position { get; }
Property Value
Methods
Start(Vector2, IEnumerable<(Vector2 Distance, float Duration)>)
Start position calculation.
bool Start(Vector2 startPosition, IEnumerable<(Vector2 Distance, float Duration)> touchHistory)
Parameters
startPosition
Vector2The position motion should begin at.
touchHistory
IEnumerable<(Vector2 Distance, float Duration)>Sequence of distance and duration pairs for a couple of last frames.
Returns
Update(float)
Recalculates position.
void Update(float time)
Parameters
time
floatTime elapsed from the start.