Class TweenOptions
- Namespace
- FriedSynapse.FlowEnt
Provides options for tween.
public class TweenOptions : AbstractAnimationOptions
- Inheritance
-
TweenOptions
- Inherited Members
- Extension Methods
Constructors
TweenOptions()
Initialises a new instance of the TweenOptions class.
public TweenOptions()
Fields
DefaultEasing
public const Easing DefaultEasing = Linear
Field Value
DefaultEasingReverse
public const bool DefaultEasingReverse = false
Field Value
DefaultIEasing
public static readonly IEasing DefaultIEasing
Field Value
DefaultTime
public const float DefaultTime = 1
Field Value
Properties
Easing
The easing of the tween.
public IEasing Easing { get; set; }
Property Value
LoopType
The loop type of the tween.
public LoopType LoopType { get; set; }
Property Value
Time
The amount of time in seconds that this tween will last.
public float Time { get; set; }
Property Value
Methods
SetAutoStart(bool)
Sets whether this animation should auto-start or not.
public TweenOptions SetAutoStart(bool autoStart)
Parameters
autoStart
bool
Returns
Remarks
Auto-start will be slower than a true-start. See more at https://flowent.friedsynapse.com/tips#h.s5cucrg5qyjc
SetDelay(float)
Sets the amount of time in seconds that you want to delay when this animation is started.
public TweenOptions SetDelay(float time)
Parameters
time
float
Returns
SetDelayUntil(Func<bool>)
Sets the callback that holds the starting of the animation.
public TweenOptions SetDelayUntil(Func<bool> callback)
Parameters
Returns
SetEasing(AnimationCurve, bool)
Sets the easing of the tween using an animation curve.
public TweenOptions SetEasing(AnimationCurve animationCurve, bool reverse = false)
Parameters
animationCurve
AnimationCurvereverse
boolWill apply a reverse on the easing.
Returns
SetEasing(Easing, bool)
Sets the easing of the tween using predefined values.
public TweenOptions SetEasing(Easing easing, bool reverse = false)
Parameters
Returns
SetEasing(IEasing, bool)
Sets the easing of the tween.
public TweenOptions SetEasing(IEasing easing, bool reverse = false)
Parameters
Returns
SetEasing(Func<float, float>, bool)
Sets the easing of the tween using a FunctionEasing.
public TweenOptions SetEasing(Func<float, float> easing, bool reverse = false)
Parameters
Returns
SetLoopCount(int?)
Sets the amount of loops you want this animation to have. If you want infinite loops pass a null value.
public TweenOptions SetLoopCount(int? loopCount)
Parameters
loopCount
int?
Returns
Remarks
Flows only have reset loop types.
SetLoopType(LoopType)
Sets the loop type of the tween.
public TweenOptions SetLoopType(LoopType loopType)
Parameters
loopType
LoopType
Returns
SetName(string)
Sets the name of the animation.
public TweenOptions SetName(string name)
Parameters
name
string
Returns
SetSkipFrames(int)
Sets the amount of frames you want to skip at when this animation is started.
public TweenOptions SetSkipFrames(int frames)
Parameters
frames
int
Returns
SetTime(float)
Sets the amount of time in seconds that this tween will last.
public TweenOptions SetTime(float time)
Parameters
time
float
Returns
SetTimeScale(float)
Sets the time scale for the current animation.
public TweenOptions SetTimeScale(float timeScale)
Parameters
timeScale
float
Returns
SetUpdateType(UpdateType)
Sets the update type for the animation.
public TweenOptions SetUpdateType(UpdateType updateType)
Parameters
updateType
UpdateType