Holoville.HOTween  1.2.010
ABSTweenComponent Class Reference

Base class for all HOTween members (Tweener and Sequence). More...

Inheritance diagram for ABSTweenComponent:
IHOTweenComponent Sequence Tweener

List of all members.

Public Member Functions

void Kill ()
 Kills this Tweener/Sequence, removes it from HOTween, and cleans it.
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.
abstract void Rewind ()
 Rewinds this Tweener/Sequence (loops and tween delay included), and pauses it.
abstract 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 curren position.
void Complete ()
 Completes this Tweener/Sequence. Where a loop was involved, 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 GoTo (float p_time, bool p_forceUpdate)
 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.
bool GoToAndPlay (float p_time, bool p_forceUpdate)
 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 coroutine 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.
void ApplyCallback (CallbackType p_callbackType, GameObject p_sendMessageTarget, string p_methodName, object p_value, SendMessageOptions p_options=SendMessageOptions.RequireReceiver)
 Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type. This overload will use sendMessage to call the method named p_methodName on every MonoBehaviour in the p_sendMessageTarget GameObject.
abstract bool IsTweening (object p_target)
 Returns true if the given target is currently involved in a running tween or sequence. Returns false both if the given target is not inside a tween, than if the relative tween is paused. To simply check if the target is attached to a tween or sequence, use IsLinkedTo( target ) instead.
abstract bool IsTweening (string p_id)
 Returns true if the tween with the given string id is currently involved in a running tween or sequence.
abstract bool IsTweening (int p_id)
 Returns true if the tween with the given int id is currently involved in a running tween or sequence.
abstract bool IsLinkedTo (object p_target)
 Returns true if the given target is linked to a tween or sequence (running or not).
abstract List< object > GetTweenTargets ()
 Returns a list of all the targets of this tween, or NULL if there are none.

Properties

string id [get, set]
 Eventual string ID of this Tweener/Sequence (more than one Tweener/Sequence 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]
 Eventual int ID of this Tweener/Sequence (more than one Tweener/Sequence 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, which means this Tweener/Sequence will be killed and removed from HOTween as soon as it's completed. If false doesn't remove this Tweener/Sequence from HOTween when it is completed, 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).
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).
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 destroyed [get]
 Returns a value of true if this Tweener/Sequence was destroyed (either because it was manually destroyed, because it was completed, or because its target was destroyed).
bool isEmpty [get]
 Returns a value of true if this Tweener/Sequence contains no tweens (if this is a tween, it means that no valid property to tween was set; if this is a sequence, it means no valid Tweener was yet 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.

Detailed Description

Base class for all HOTween members (Tweener and Sequence).


Member Function Documentation

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.

Parameters:
p_callbackTypeThe type of callback to apply
p_callbackThe function to call, who must return void and accept no parameters

Implements IHOTweenComponent.

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.

Parameters:
p_callbackTypeThe type of callback to apply
p_callbackThe function to call. It must return void and has to accept a single parameter of type TweenEvent
p_callbackParmsAdditional comma separated parameters to pass to the function

Implements IHOTweenComponent.

void ApplyCallback ( CallbackType  p_callbackType,
GameObject  p_sendMessageTarget,
string  p_methodName,
object  p_value,
SendMessageOptions  p_options = SendMessageOptions.RequireReceiver 
)

Assigns the given callback to this Tweener/Sequence, overwriting any existing callbacks of the same type. This overload will use sendMessage to call the method named p_methodName on every MonoBehaviour in the p_sendMessageTarget GameObject.

Parameters:
p_callbackTypeThe type of callback to apply
p_sendMessageTargetGameObject to target for sendMessage
p_methodNameName of the method to call
p_valueEventual additional parameter
p_optionsSendMessageOptions
void Complete ( )

Completes this Tweener/Sequence. Where a loop was involved, 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.

Implements IHOTweenComponent.

abstract List<object> GetTweenTargets ( ) [pure virtual]

Returns a list of all the targets of this tween, or NULL if there are none.

Returns:
A list of all the targets of this tween, or NULL if there are none.

Implemented in Sequence, and Tweener.

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.

Parameters:
p_timeThe time where the Tweener/Sequence should be sent.
Returns:
Returns true if the Tweener/Sequence reached its end and was completed.

Implements IHOTweenComponent.

bool GoTo ( float  p_time,
bool  p_forceUpdate 
)

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.

Parameters:
p_timeThe time where the Tweener/Sequence should be sent.
p_forceUpdateBy default, if a Tweener/Sequence is already at the exact given time, it will not be refreshed. Setting this to true will force it to refresh (useful only if you want to be sure that any changes you made to the tweened property, outside of HOTween, are reset).
Returns:
Returns true if the Tweener/Sequence reached its end and was completed.
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.

Parameters:
p_timeThe time where the Tweener/Sequence should be sent.
Returns:
Returns true if the Tweener/Sequence reached its end and was completed.

Implements IHOTweenComponent.

bool GoToAndPlay ( float  p_time,
bool  p_forceUpdate 
)

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.

Parameters:
p_timeThe time where the Tweener/Sequence should be sent.
p_forceUpdateBy default, if a Tweener/Sequence is already at the exact given time, it will not be refreshed. Setting this to true will force it to refresh (useful only if you want to be sure that any changes you made to the tweened property, outside of HOTween, are reset).
Returns:
Returns true if the Tweener/Sequence reached its end and was completed.
abstract bool IsLinkedTo ( object  p_target) [pure virtual]

Returns true if the given target is linked to a tween or sequence (running or not).

Parameters:
p_targetThe target to check.
Returns:
A value of true if the given target is linked to a tween or sequence (running or not).

Implements IHOTweenComponent.

Implemented in Sequence, and Tweener.

abstract bool IsTweening ( object  p_target) [pure virtual]

Returns true if the given target is currently involved in a running tween or sequence. Returns false both if the given target is not inside a tween, than if the relative tween is paused. To simply check if the target is attached to a tween or sequence, use IsLinkedTo( target ) instead.

Parameters:
p_targetThe target to check.
Returns:
A value of true if the given target is currently involved in a running tween or sequence.

Implements IHOTweenComponent.

Implemented in Tweener, and Sequence.

abstract bool IsTweening ( string  p_id) [pure virtual]

Returns true if the tween with the given string id is currently involved in a running tween or sequence.

Parameters:
p_idThe id to check for.

Implemented in Tweener, and Sequence.

abstract bool IsTweening ( int  p_id) [pure virtual]

Returns true if the tween with the given int id is currently involved in a running tween or sequence.

Parameters:
p_idThe id to check for.

Implemented in Sequence, and Tweener.

void Kill ( )

Kills this Tweener/Sequence, removes it from HOTween, and cleans it.

Implements IHOTweenComponent.

void Pause ( )

Pauses this Tweener/Sequence.

Implements IHOTweenComponent.

void Play ( )

Resumes this Tweener/Sequence (tween delay included).

Implements IHOTweenComponent.

void PlayBackwards ( )

Resumes this Tweener/Sequence and plays it backwards.

Implements IHOTweenComponent.

void PlayForward ( )

Resumes this Tweener/Sequence (tween delay included) and plays it forward.

Implements IHOTweenComponent.

abstract void Restart ( ) [pure virtual]

Restarts this Tweener/Sequence from the beginning (loops and tween delay included).

Implements IHOTweenComponent.

Implemented in Sequence, and Tweener.

void Reverse ( bool  p_forcePlay = false)

Reverses this Tweener/Sequence, animating it backwards from its curren position.

Parameters:
p_forcePlayIf TRUE, the tween will also start playing in case it was paused, otherwise it will maintain its current play/pause state (default).

Implements IHOTweenComponent.

abstract void Rewind ( ) [pure virtual]

Rewinds this Tweener/Sequence (loops and tween delay included), and pauses it.

Implements IHOTweenComponent.

Implemented in 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 coroutine as a yield. Ex: yield return StartCoroutine( myTweenComponent.WaitForCompletion() );.

Implements IHOTweenComponent.

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() );.

Implements IHOTweenComponent.


Property Documentation

bool autoKillOnComplete [get, set]

Default is true, which means this Tweener/Sequence will be killed and removed from HOTween as soon as it's completed. If false doesn't remove this Tweener/Sequence from HOTween when it is completed, and you will need to call an HOTween.Kill to remove this Tweener/Sequence.

Implements IHOTweenComponent.

int completedLoops [get]

Number of loops that have been executed.

Implements IHOTweenComponent.

bool destroyed [get]

Returns a value of true if this Tweener/Sequence was destroyed (either because it was manually destroyed, because it was completed, or because its target was destroyed).

float duration [get]

Duration of this Tweener/Sequence, loops and tween delay excluded.

Implements IHOTweenComponent.

float elapsed [get]

Elapsed time within the current loop (tween delay excluded).

Implements IHOTweenComponent.

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.).

Implements IHOTweenComponent.

float fullDuration [get]

Full duration of this Tweener/Sequence, loops included (when not infinite) but tween delay excluded.

Implements IHOTweenComponent.

float fullElapsed [get]

Full elapsed time including loops (but without considering tween delay).

Implements IHOTweenComponent.

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.

Implements IHOTweenComponent.

string id [get, set]

Eventual string ID of this Tweener/Sequence (more than one Tweener/Sequence can share the same ID, thus allowing for grouped operations). You can also use intId instead of id for faster operations.

Implements IHOTweenComponent.

int intId [get, set]

Eventual int ID of this Tweener/Sequence (more than one Tweener/Sequence 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.

Implements IHOTweenComponent.

bool isComplete [get]

Returns a value of true when this Tweener/Sequence is complete.

Implements IHOTweenComponent.

bool isEmpty [get]

Returns a value of true if this Tweener/Sequence contains no tweens (if this is a tween, it means that no valid property to tween was set; if this is a sequence, it means no valid Tweener was yet added).

Implements IHOTweenComponent.

bool isLoopingBack [get]

Returns a value of true when this Tweener/Sequence is in the "going backwards" part of a Yoyo loop.

Implements IHOTweenComponent.

bool isPaused [get]

Returns a value of true if this Tweener/Sequence is paused.

Implements IHOTweenComponent.

bool isReversed [get]

Returns a value of true if this Tweener/Sequence is set to go backwards (because of a call to Reverse.

Implements IHOTweenComponent.

bool isSequenced [get]

Returns a value of true if this Tweener/Sequence was added to a Sequence.

Implements IHOTweenComponent.

int loops [get, set]

Number of times the Tweener/Sequence will run (-1 means the tween has infinite loops).

Implements IHOTweenComponent.

LoopType loopType [get, set]

Type of loop for this Tweener/Sequence, in case loops is greater than 1 (or infinite).

Implements IHOTweenComponent.

float position [get, set]

Gets and sets the time position of the Tweener/Sequence (loops are included when not infinite, delay is not).

Implements IHOTweenComponent.

float timeScale [get, set]

Time scale that will be used by this Tweener/Sequence.

Implements IHOTweenComponent.

The update type for this Tweener/Sequence.

Implements IHOTweenComponent.

 All Classes Namespaces Functions Variables Enumerations Properties