NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TweenPosition Class Reference

Tween the object's position. More...

Inheritance diagram for TweenPosition:
UITweener

Public Member Functions

override void SetStartToCurrentValue ()
 Set the 'from' value to the current one. More...
 
override void SetEndToCurrentValue ()
 Set the 'to' value to the current one. More...
 
- Public Member Functions inherited from UITweener
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...
 

Static Public Member Functions

static TweenPosition Begin (GameObject go, float duration, Vector3 pos)
 Start the tweening operation. More...
 
static TweenPosition Begin (GameObject go, float duration, Vector3 pos, bool worldSpace)
 Start the tweening operation. More...
 
- Static Public Member Functions inherited from UITweener
static T Begin< T > (GameObject go, float duration)
 Starts the tweening operation. More...
 

Public Attributes

Vector3 from
 
Vector3 to
 
bool worldSpace = false
 
- Public Attributes inherited from UITweener
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< EventDelegateonFinished = new List<EventDelegate>()
 Event delegates called when the animation finishes. More...
 
GameObject eventReceiver
 
string callWhenFinished
 

Protected Member Functions

override void OnUpdate (float factor, bool isFinished)
 Tween the value. More...
 
- Protected Member Functions inherited from UITweener
virtual void Start ()
 Update as soon as it's started so that there is no delay. More...
 

Properties

Transform cachedTransform [get]
 
Vector3 position [get, set]
 
Vector3 value [get, set]
 Tween's current value. More...
 
- Properties inherited from UITweener
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...
 

Additional Inherited Members

- Public Types inherited from UITweener
enum  Method {
  Method.Linear, Method.EaseIn, Method.EaseOut, Method.EaseInOut,
  Method.BounceIn, Method.BounceOut
}
 
enum  Style { Style.Once, Style.Loop, Style.PingPong }
 
- Static Public Attributes inherited from UITweener
static UITweener current
 Current tween that triggered the callback function. More...
 

Detailed Description

Tween the object's position.

Member Function Documentation

static TweenPosition TweenPosition.Begin ( GameObject  go,
float  duration,
Vector3  pos 
)
static

Start the tweening operation.

static TweenPosition TweenPosition.Begin ( GameObject  go,
float  duration,
Vector3  pos,
bool  worldSpace 
)
static

Start the tweening operation.

override void TweenPosition.OnUpdate ( float  factor,
bool  isFinished 
)
protectedvirtual

Tween the value.

Implements UITweener.

override void TweenPosition.SetEndToCurrentValue ( )
virtual

Set the 'to' value to the current one.

Reimplemented from UITweener.

override void TweenPosition.SetStartToCurrentValue ( )
virtual

Set the 'from' value to the current one.

Reimplemented from UITweener.

Member Data Documentation

Vector3 TweenPosition.from
Vector3 TweenPosition.to
bool TweenPosition.worldSpace = false

Property Documentation

Transform TweenPosition.cachedTransform
get
Vector3 TweenPosition.position
getset
Vector3 TweenPosition.value
getset

Tween's current value.


The documentation for this class was generated from the following file: