C# Class Prime31.GoKitLite.GoKitLite.Tween

Exibir arquivo Open project: prime31/GoKitLite

Public Methods

Method Description
getId ( ) : int

gets the id which can be used to stop the tween later

next ( Transform trans, TweenType tweenType, float duration, Vector3 targetVector, bool isRelativeTween = false ) : Tween

adds a tween that will start as soon as this tween completes

next ( Transform trans, float duration, float>.Action action ) : Tween

adds a custom action tween that will start as soon as the current tween completes

next ( TweenType tweenType, float duration, Vector3 targetVector, bool isRelativeTween = false ) : Tween

adds a tween that will start as soon as this tween completes

next ( float duration, float>.Action action ) : Tween

adds a custom action tween using this tween's Transform that will start as soon as the current tween completes

next ( float duration, Color targetColor ) : Tween

adds a color tween using this tween's Transform and type that will start as soon as this completes

next ( float duration, Color targetColor, string materialProperty, bool isRelativeTween = false ) : Tween

adds a color tween using this tween's Transform that will start as soon as this completes

next ( float duration, ITweenable newPropertyTween ) : Tween

adds a property tween that will start as soon as the current tween completes

next ( float duration, Vector3 targetVector, float delay ) : Tween

adds a vector tween using this tween's Transform and type that will start as soon as this completes

next ( float duration, Vector3 targetVector, float delay, Func,System easeFunction, bool isRelativeTween = false ) : Tween

adds a vector tween using this tween's Transform and type that will start as soon as this completes

reverseTween ( ) : void

reverses the current tween. if it was going forward it will be going backwards and vice versa.

setAnimationCurve ( AnimationCurve animCurve ) : Tween
setCompletionHandler ( Action onComplete ) : Tween

chainable. sets the action that should be called when the tween is complete. do not store a reference to the tween!

setDelay ( float delay ) : Tween

chainable. sets the delay for the tween.

setEaseType ( EaseType easeType ) : Tween

chainable. Sets the EaseType used by the tween.

setLoopCompletionHandler ( Action onLoopComplete ) : Tween

chainable. sets the action that should be called when a loop is complete. A loop is either when the first part of a ping-pong animation completes or when starting over when using a restart-from-beginning loop type. Note that ping-pong loops (which are really two part tweens) will not fire the loop completion handler on the last iteration. The normal tween completion handler will fire though

setLoopType ( LoopType loopType, int loops = 1, float delayBetweenLoops = 0f ) : Tween

chainable. set the loop type for the tween. a single pingpong loop means going from start-finish-start.

setTimeScaleIndependent ( ) : Tween

sets the tween to be time scale independent

Private Methods

Method Description
handleLooping ( ) : void

handles loop logic

prepareForUse ( ) : void

sets the appropriate start value and calculates the diffValue

reset ( ) : void
setVectorAsRequiredPerCurrentTweenType ( Vector3 &vec ) : void

if we have an appropriate tween type that takes a vector value this will correctly set it

tick ( bool completeTweenThisStep = false ) : bool

handles the tween. returns true if it is complete and ready for removal

Method Details

getId() public method

gets the id which can be used to stop the tween later
public getId ( ) : int
return int

next() public method

adds a tween that will start as soon as this tween completes
public next ( Transform trans, TweenType tweenType, float duration, Vector3 targetVector, bool isRelativeTween = false ) : Tween
trans UnityEngine.Transform
tweenType TweenType
duration float
targetVector Vector3
isRelativeTween bool
return Tween

next() public method

adds a custom action tween that will start as soon as the current tween completes
public next ( Transform trans, float duration, float>.Action action ) : Tween
trans UnityEngine.Transform
duration float
action float>.Action
return Tween

next() public method

adds a tween that will start as soon as this tween completes
public next ( TweenType tweenType, float duration, Vector3 targetVector, bool isRelativeTween = false ) : Tween
tweenType TweenType
duration float
targetVector Vector3
isRelativeTween bool
return Tween

next() public method

adds a custom action tween using this tween's Transform that will start as soon as the current tween completes
public next ( float duration, float>.Action action ) : Tween
duration float
action float>.Action
return Tween

next() public method

adds a color tween using this tween's Transform and type that will start as soon as this completes
public next ( float duration, Color targetColor ) : Tween
duration float
targetColor Color
return Tween

next() public method

adds a color tween using this tween's Transform that will start as soon as this completes
public next ( float duration, Color targetColor, string materialProperty, bool isRelativeTween = false ) : Tween
duration float
targetColor Color
materialProperty string
isRelativeTween bool
return Tween

next() public method

adds a property tween that will start as soon as the current tween completes
public next ( float duration, ITweenable newPropertyTween ) : Tween
duration float
newPropertyTween ITweenable
return Tween

next() public method

adds a vector tween using this tween's Transform and type that will start as soon as this completes
public next ( float duration, Vector3 targetVector, float delay ) : Tween
duration float
targetVector Vector3
delay float
return Tween

next() public method

adds a vector tween using this tween's Transform and type that will start as soon as this completes
public next ( float duration, Vector3 targetVector, float delay, Func,System easeFunction, bool isRelativeTween = false ) : Tween
duration float
targetVector Vector3
delay float
easeFunction Func,System
isRelativeTween bool
return Tween

reverseTween() public method

reverses the current tween. if it was going forward it will be going backwards and vice versa.
public reverseTween ( ) : void
return void

setAnimationCurve() public method

public setAnimationCurve ( AnimationCurve animCurve ) : Tween
animCurve UnityEngine.AnimationCurve
return Tween

setCompletionHandler() public method

chainable. sets the action that should be called when the tween is complete. do not store a reference to the tween!
public setCompletionHandler ( Action onComplete ) : Tween
onComplete Action
return Tween

setDelay() public method

chainable. sets the delay for the tween.
public setDelay ( float delay ) : Tween
delay float
return Tween

setEaseType() public method

chainable. Sets the EaseType used by the tween.
public setEaseType ( EaseType easeType ) : Tween
easeType EaseType
return Tween

setLoopCompletionHandler() public method

chainable. sets the action that should be called when a loop is complete. A loop is either when the first part of a ping-pong animation completes or when starting over when using a restart-from-beginning loop type. Note that ping-pong loops (which are really two part tweens) will not fire the loop completion handler on the last iteration. The normal tween completion handler will fire though
public setLoopCompletionHandler ( Action onLoopComplete ) : Tween
onLoopComplete Action
return Tween

setLoopType() public method

chainable. set the loop type for the tween. a single pingpong loop means going from start-finish-start.
public setLoopType ( LoopType loopType, int loops = 1, float delayBetweenLoops = 0f ) : Tween
loopType LoopType
loops int
delayBetweenLoops float
return Tween

setTimeScaleIndependent() public method

sets the tween to be time scale independent
public setTimeScaleIndependent ( ) : Tween
return Tween