NGUI: Next-Gen UI kit
3.7.2
|
Base class for all tweening operations. More...
Public Types | |
enum | Method { Method.Linear, Method.EaseIn, Method.EaseOut, Method.EaseInOut, Method.BounceIn, Method.BounceOut } |
enum | Style { Style.Once, Style.Loop, Style.PingPong } |
Public Member Functions | |
void | SetOnFinished (EventDelegate.Callback del) |
Convenience function – set a new OnFinished event delegate (here for to be consistent with RemoveOnFinished). More... | |
void | SetOnFinished (EventDelegate del) |
Convenience function – set a new OnFinished event delegate (here for to be consistent with RemoveOnFinished). More... | |
void | AddOnFinished (EventDelegate.Callback del) |
Convenience function – add a new OnFinished event delegate (here for to be consistent with RemoveOnFinished). More... | |
void | AddOnFinished (EventDelegate del) |
Convenience function – add a new OnFinished event delegate (here for to be consistent with RemoveOnFinished). More... | |
void | RemoveOnFinished (EventDelegate del) |
Remove an OnFinished delegate. Will work even while iterating through the list when the tweener has finished its operation. More... | |
void | Sample (float factor, bool isFinished) |
Sample the tween at the specified factor. More... | |
void | Play () |
Play the tween. More... | |
void | PlayForward () |
Play the tween forward. More... | |
void | PlayReverse () |
Play the tween in reverse. More... | |
void | Play (bool forward) |
Manually activate the tweening process, reversing it if necessary. More... | |
void | ResetToBeginning () |
Manually reset the tweener's state to the beginning. If the tween is playing forward, this means the tween's start. If the tween is playing in reverse, this means the tween's end. More... | |
void | Toggle () |
Manually start the tweening process, reversing its direction. More... | |
virtual void | SetStartToCurrentValue () |
Set the 'from' value to the current one. More... | |
virtual void | SetEndToCurrentValue () |
Set the 'to' value to the current one. More... | |
Static Public Member Functions | |
static T | Begin< T > (GameObject go, float duration) |
Starts the tweening operation. More... | |
Public Attributes | |
Method | method = Method.Linear |
Tweening method used. More... | |
Style | style = Style.Once |
Does it play once? Does it loop? More... | |
AnimationCurve | animationCurve = new AnimationCurve(new Keyframe(0f, 0f, 0f, 1f), new Keyframe(1f, 1f, 1f, 0f)) |
Optional curve to apply to the tween's time factor value. More... | |
bool | ignoreTimeScale = true |
Whether the tween will ignore the timescale, making it work while the game is paused. More... | |
float | delay = 0f |
How long will the tweener wait before starting the tween? More... | |
float | duration = 1f |
How long is the duration of the tween? More... | |
bool | steeperCurves = false |
Whether the tweener will use steeper curves for ease in / out style interpolation. More... | |
int | tweenGroup = 0 |
Used by buttons and tween sequences. Group of '0' means not in a sequence. More... | |
List< EventDelegate > | onFinished = new List<EventDelegate>() |
Event delegates called when the animation finishes. More... | |
GameObject | eventReceiver |
string | callWhenFinished |
Static Public Attributes | |
static UITweener | current |
Current tween that triggered the callback function. More... | |
Protected Member Functions | |
virtual void | Start () |
Update as soon as it's started so that there is no delay. More... | |
abstract void | OnUpdate (float factor, bool isFinished) |
Actual tweening logic should go here. More... | |
Properties | |
float | amountPerDelta [get] |
Amount advanced per delta time. More... | |
float | tweenFactor [get, set] |
Tween factor, 0-1 range. More... | |
AnimationOrTween.Direction | direction [get] |
Direction that the tween is currently playing in. More... | |
Base class for all tweening operations.
enum UITweener.Method |
enum UITweener.Style |
void UITweener.AddOnFinished | ( | EventDelegate.Callback | del | ) |
Convenience function – add a new OnFinished event delegate (here for to be consistent with RemoveOnFinished).
void UITweener.AddOnFinished | ( | EventDelegate | del | ) |
Convenience function – add a new OnFinished event delegate (here for to be consistent with RemoveOnFinished).
|
static |
Starts the tweening operation.
T | : | UITweener |
|
protectedpure virtual |
Actual tweening logic should go here.
Implemented in TweenVolume, TweenColor, TweenPosition, TweenAlpha, TweenOrthoSize, TweenHeight, TweenWidth, TweenFOV, TweenRotation, TweenScale, and TweenTransform.
void UITweener.Play | ( | ) |
Play the tween.
void UITweener.Play | ( | bool | forward | ) |
Manually activate the tweening process, reversing it if necessary.
void UITweener.PlayForward | ( | ) |
Play the tween forward.
void UITweener.PlayReverse | ( | ) |
Play the tween in reverse.
void UITweener.RemoveOnFinished | ( | EventDelegate | del | ) |
Remove an OnFinished delegate. Will work even while iterating through the list when the tweener has finished its operation.
void UITweener.ResetToBeginning | ( | ) |
Manually reset the tweener's state to the beginning. If the tween is playing forward, this means the tween's start. If the tween is playing in reverse, this means the tween's end.
void UITweener.Sample | ( | float | factor, |
bool | isFinished | ||
) |
Sample the tween at the specified factor.
|
virtual |
Set the 'to' value to the current one.
Reimplemented in TweenPosition, TweenColor, TweenVolume, TweenHeight, TweenWidth, TweenAlpha, TweenScale, TweenOrthoSize, TweenRotation, and TweenFOV.
void UITweener.SetOnFinished | ( | EventDelegate.Callback | del | ) |
Convenience function – set a new OnFinished event delegate (here for to be consistent with RemoveOnFinished).
void UITweener.SetOnFinished | ( | EventDelegate | del | ) |
Convenience function – set a new OnFinished event delegate (here for to be consistent with RemoveOnFinished).
|
virtual |
Set the 'from' value to the current one.
Reimplemented in TweenPosition, TweenColor, TweenVolume, TweenHeight, TweenWidth, TweenAlpha, TweenScale, TweenOrthoSize, TweenRotation, and TweenFOV.
|
protectedvirtual |
Update as soon as it's started so that there is no delay.
void UITweener.Toggle | ( | ) |
Manually start the tweening process, reversing its direction.
AnimationCurve UITweener.animationCurve = new AnimationCurve(new Keyframe(0f, 0f, 0f, 1f), new Keyframe(1f, 1f, 1f, 0f)) |
Optional curve to apply to the tween's time factor value.
string UITweener.callWhenFinished |
|
static |
Current tween that triggered the callback function.
float UITweener.delay = 0f |
How long will the tweener wait before starting the tween?
float UITweener.duration = 1f |
How long is the duration of the tween?
GameObject UITweener.eventReceiver |
bool UITweener.ignoreTimeScale = true |
Whether the tween will ignore the timescale, making it work while the game is paused.
Method UITweener.method = Method.Linear |
Tweening method used.
List<EventDelegate> UITweener.onFinished = new List<EventDelegate>() |
Event delegates called when the animation finishes.
bool UITweener.steeperCurves = false |
Whether the tweener will use steeper curves for ease in / out style interpolation.
Style UITweener.style = Style.Once |
Does it play once? Does it loop?
int UITweener.tweenGroup = 0 |
Used by buttons and tween sequences. Group of '0' means not in a sequence.
|
get |
Amount advanced per delta time.
|
get |
Direction that the tween is currently playing in.
|
getset |
Tween factor, 0-1 range.