Public interface shared by Tweener and Sequence. More...
Public Member Functions | |
void | Kill () |
Kills this Tweener/Sequence. | |
void | Play () |
Resumes this Tweener/Sequence (tween delay included). | |
void | PlayForward () |
Resumes this Tweener/Sequence (tween delay included) and plays it forward. | |
void | PlayBackwards () |
Resumes this Tweener/Sequence and plays it backwards. | |
void | Pause () |
Pauses this Tweener/Sequence. | |
void | Rewind () |
Rewinds this Tweener/Sequence (loops and tween delay included), and pauses it. | |
void | Restart () |
Restarts this Tweener/Sequence from the beginning (loops and tween delay included). | |
void | Reverse (bool p_forcePlay=false) |
Reverses this Tweener/Sequence, animating it backwards from its current position. | |
void | Complete () |
Completes this Tweener/Sequence. Where a loop was involved and not infinite, the Tweener/Sequence completes at the position where it would actually be after the set number of loops. If there were infinite loops, this method will have no effect. | |
bool | GoTo (float p_time) |
Sends the Tweener/Sequence to the given time (taking also loops into account). If the time is bigger than the total Tweener/Sequence duration, it goes to the end. | |
bool | GoToAndPlay (float p_time) |
Sends the Tweener/Sequence to the given time (taking also loops into account) and plays it. If the time is bigger than the total Tweener/Sequence duration, it goes to the end. | |
IEnumerator | WaitForCompletion () |
A coroutine that waits until the Tweener/Sequence is complete (delays and loops included). You can use it inside a coroutin as a yield. Ex: yield return StartCoroutine( myTweenComponent.WaitForCompletion() );. | |
IEnumerator | WaitForRewind () |
A coroutine that waits until the Tweener/Sequence is rewinded (loops included). You can use it inside a coroutine as a yield. Ex: yield return StartCoroutine( myTweenComponent.WaitForRewind() );. | |
void | ApplyCallback (CallbackType p_callbackType, TweenDelegate.TweenCallback p_callback) |
Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type. | |
void | ApplyCallback (CallbackType p_callbackType, TweenDelegate.TweenCallbackWParms p_callback, params object[] p_callbackParms) |
Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type. | |
bool | IsTweening (object p_target) |
Returns true if the given target is currently involved in this Tweener/Sequence (taking into account also nested tweens). Returns false both if the given target is not inside this Tweener/Sequence, than if the relative Tweener/Sequence is paused. To simply check if the target is attached to this Tweener/Sequence, use IsLinkedTo( target ) instead. | |
bool | IsLinkedTo (object p_target) |
Returns true if the given target is linked to this Tweener/Sequence (running or not, taking into account also nested tweens). | |
Properties | |
string | id [get, set] |
Eventual ID of this tween (more than one tween can share the same ID, thus allowing for grouped operations). You can also use intId instead of id for faster operations. | |
int | intId [get, set] |
Default is -1 . Eventual int ID of this tween (more than one tween can share the same intId, thus allowing for grouped operations). The main difference from id is that while id is more legible, intId allows for faster operations. | |
bool | autoKillOnComplete [get, set] |
Default is true . If false doesn't remove this Tweener/Sequence from HOTween's list when it is completed (useful if you want to be able to control it independently with GoTo, instead than letting it run), and you will need to call an HOTween.Kill to remove this Tweener/Sequence. | |
bool | enabled [get, set] |
Default is true . If set to false , this Tweener/Sequence will not be updated, and any use of animation methods (Play/Pause/Rewind/etc) will be ignored (both if called directly via this instance, than if using HOTween.Play/Pause/Rewind/etc.). | |
float | timeScale [get, set] |
Time scale that will be used by this Tweener/Sequence. | |
int | loops [get, set] |
Number of times the Tweener/Sequence will run (-1 means the tween has infinite loops, 1 means the tween will run only once). | |
LoopType | loopType [get, set] |
Type of loop for this Tweener/Sequence, in case loops is greater than 1 (or infinite). | |
float | position [get, set] |
Gets and sets the time position of the Tweener/Sequence (loops are included when not infinite, delay is not). | |
float | duration [get] |
Duration of this Tweener/Sequence, loops and tween delay excluded. | |
float | fullDuration [get] |
Full duration of this Tweener/Sequence, loops included (when not infinite) but tween delay excluded. | |
float | elapsed [get] |
Elapsed time within the current loop (tween delay excluded). Note that elapsed will be equal to duration only when all the loops are completed, otherwise each time a loop is completed, completedLoops is augmented by 1 and elapsed is reset to 0 . | |
float | fullElapsed [get] |
Full elapsed time including loops (but without considering tween delay). | |
UpdateType | updateType [get] |
The update type for this Tweener/Sequence. | |
int | completedLoops [get] |
Number of loops that have been executed. | |
bool | isEmpty [get] |
Returns a value of true if this Tweener/Sequence contains no tweens (if this is a Tweener, it means that no valid property to tween was set; if this is a Sequence, it means no valid Tweener was added). | |
bool | isReversed [get] |
Returns a value of true if this Tweener/Sequence is set to go backwards (because of a call to Reverse . | |
bool | isLoopingBack [get] |
Returns a value of true when this Tweener/Sequence is in the "going backwards" part of a Yoyo loop. | |
bool | isPaused [get] |
Returns a value of true if this Tweener/Sequence is paused. | |
bool | hasStarted [get] |
Returns a value of true after this Tweener/Sequence was started the first time, or if a call to GoTo or GoToAndPlay was executed. | |
bool | isComplete [get] |
Returns a value of true when this Tweener/Sequence is complete. | |
bool | isSequenced [get] |
Returns a value of true if this Tweener/Sequence was added to a Sequence. |
void ApplyCallback | ( | CallbackType | p_callbackType, |
TweenDelegate.TweenCallback | p_callback | ||
) |
Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type.
p_callbackType | The type of callback to apply |
p_callback | The function to call, who must return void and accept no parameters |
Implemented in ABSTweenComponent.
void ApplyCallback | ( | CallbackType | p_callbackType, |
TweenDelegate.TweenCallbackWParms | p_callback, | ||
params object[] | p_callbackParms | ||
) |
Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type.
p_callbackType | The type of callback to apply |
p_callback | The function to call, who must return void and accept no parameters. It must return void and has to accept a single parameter of type TweenEvent |
p_callbackParms | Additional comma separated parameters to pass to the function |
Implemented in ABSTweenComponent.
void Complete | ( | ) |
Completes this Tweener/Sequence. Where a loop was involved and not infinite, the Tweener/Sequence completes at the position where it would actually be after the set number of loops. If there were infinite loops, this method will have no effect.
Implemented in ABSTweenComponent.
bool GoTo | ( | float | p_time | ) |
Sends the Tweener/Sequence to the given time (taking also loops into account). If the time is bigger than the total Tweener/Sequence duration, it goes to the end.
p_time | The time where the Tweener/Sequence should be sent. |
true
if the Tweener/Sequence reached its end and was completed. Implemented in ABSTweenComponent.
bool GoToAndPlay | ( | float | p_time | ) |
Sends the Tweener/Sequence to the given time (taking also loops into account) and plays it. If the time is bigger than the total Tweener/Sequence duration, it goes to the end.
p_time | The time where the Tweener/Sequence should be sent. |
true
if the Tweener/Sequence reached its end and was completed. Implemented in ABSTweenComponent.
bool IsLinkedTo | ( | object | p_target | ) |
Returns true
if the given target is linked to this Tweener/Sequence (running or not, taking into account also nested tweens).
p_target | The target to check. |
true
if the given target is linked to this Tweener/Sequence (running or not, taking into account also nested tweens). Implemented in ABSTweenComponent, Sequence, and Tweener.
bool IsTweening | ( | object | p_target | ) |
Returns true
if the given target is currently involved in this Tweener/Sequence (taking into account also nested tweens). Returns false
both if the given target is not inside this Tweener/Sequence, than if the relative Tweener/Sequence is paused. To simply check if the target is attached to this Tweener/Sequence, use IsLinkedTo( target )
instead.
p_target | The target to check. |
true
if the given target is currently involved in a running tween or sequence. Implemented in ABSTweenComponent, Tweener, and Sequence.
void Kill | ( | ) |
Kills this Tweener/Sequence.
Implemented in ABSTweenComponent.
void Pause | ( | ) |
Pauses this Tweener/Sequence.
Implemented in ABSTweenComponent.
void Play | ( | ) |
Resumes this Tweener/Sequence (tween delay included).
Implemented in ABSTweenComponent.
void PlayBackwards | ( | ) |
Resumes this Tweener/Sequence and plays it backwards.
Implemented in ABSTweenComponent.
void PlayForward | ( | ) |
Resumes this Tweener/Sequence (tween delay included) and plays it forward.
Implemented in ABSTweenComponent.
void Restart | ( | ) |
Restarts this Tweener/Sequence from the beginning (loops and tween delay included).
Implemented in ABSTweenComponent, Sequence, and Tweener.
void Reverse | ( | bool | p_forcePlay = false | ) |
Reverses this Tweener/Sequence, animating it backwards from its current position.
p_forcePlay | If TRUE, the tween will also start playing in case it was paused, otherwise it will maintain its current play/pause state (default). |
Implemented in ABSTweenComponent.
void Rewind | ( | ) |
Rewinds this Tweener/Sequence (loops and tween delay included), and pauses it.
Implemented in ABSTweenComponent, Sequence, and Tweener.
IEnumerator WaitForCompletion | ( | ) |
A coroutine that waits until the Tweener/Sequence is complete (delays and loops included). You can use it inside a coroutin as a yield. Ex: yield return StartCoroutine( myTweenComponent.WaitForCompletion() );.
Implemented in ABSTweenComponent.
IEnumerator WaitForRewind | ( | ) |
A coroutine that waits until the Tweener/Sequence is rewinded (loops included). You can use it inside a coroutine as a yield. Ex: yield return StartCoroutine( myTweenComponent.WaitForRewind() );.
Implemented in ABSTweenComponent.
bool autoKillOnComplete [get, set] |
Default is true
. If false
doesn't remove this Tweener/Sequence from HOTween's list when it is completed (useful if you want to be able to control it independently with GoTo, instead than letting it run), and you will need to call an HOTween.Kill
to remove this Tweener/Sequence.
Implemented in ABSTweenComponent.
int completedLoops [get] |
Number of loops that have been executed.
Implemented in ABSTweenComponent.
float duration [get] |
Duration of this Tweener/Sequence, loops and tween delay excluded.
Implemented in ABSTweenComponent.
float elapsed [get] |
Elapsed time within the current loop (tween delay excluded). Note that elapsed
will be equal to duration
only when all the loops are completed, otherwise each time a loop is completed, completedLoops
is augmented by 1 and elapsed
is reset to 0
.
Implemented in ABSTweenComponent.
bool enabled [get, set] |
Default is true
. If set to false
, this Tweener/Sequence will not be updated, and any use of animation methods (Play/Pause/Rewind/etc) will be ignored (both if called directly via this instance, than if using HOTween.Play/Pause/Rewind/etc.).
Implemented in ABSTweenComponent.
float fullDuration [get] |
Full duration of this Tweener/Sequence, loops included (when not infinite) but tween delay excluded.
Implemented in ABSTweenComponent.
float fullElapsed [get] |
Full elapsed time including loops (but without considering tween delay).
Implemented in ABSTweenComponent.
bool hasStarted [get] |
Returns a value of true
after this Tweener/Sequence was started the first time, or if a call to GoTo
or GoToAndPlay
was executed.
Implemented in ABSTweenComponent.
string id [get, set] |
Eventual ID of this tween (more than one tween can share the same ID, thus allowing for grouped operations). You can also use intId
instead of id
for faster operations.
Implemented in ABSTweenComponent.
int intId [get, set] |
Default is -1
. Eventual int ID of this tween (more than one tween can share the same intId, thus allowing for grouped operations). The main difference from id
is that while id
is more legible, intId
allows for faster operations.
Implemented in ABSTweenComponent.
bool isComplete [get] |
Returns a value of true
when this Tweener/Sequence is complete.
Implemented in ABSTweenComponent.
bool isEmpty [get] |
Returns a value of true
if this Tweener/Sequence contains no tweens (if this is a Tweener, it means that no valid property to tween was set; if this is a Sequence, it means no valid Tweener was added).
Implemented in ABSTweenComponent.
bool isLoopingBack [get] |
Returns a value of true
when this Tweener/Sequence is in the "going backwards" part of a Yoyo loop.
Implemented in ABSTweenComponent.
bool isPaused [get] |
Returns a value of true
if this Tweener/Sequence is paused.
Implemented in ABSTweenComponent.
bool isReversed [get] |
Returns a value of true
if this Tweener/Sequence is set to go backwards (because of a call to Reverse
.
Implemented in ABSTweenComponent.
bool isSequenced [get] |
Returns a value of true
if this Tweener/Sequence was added to a Sequence.
Implemented in ABSTweenComponent.
int loops [get, set] |
Number of times the Tweener/Sequence will run (-1
means the tween has infinite loops, 1
means the tween will run only once).
Implemented in ABSTweenComponent.
Type of loop for this Tweener/Sequence, in case loops is greater than 1 (or infinite).
Implemented in ABSTweenComponent.
float position [get, set] |
Gets and sets the time position of the Tweener/Sequence (loops are included when not infinite, delay is not).
Implemented in ABSTweenComponent.
float timeScale [get, set] |
Time scale that will be used by this Tweener/Sequence.
Implemented in ABSTweenComponent.
UpdateType updateType [get] |
The update type for this Tweener/Sequence.
Implemented in ABSTweenComponent.