DOTween  0.8.530
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
TweenParms Class Reference

This class serves only as a utility class to store tween settings to apply on multiple tweens. It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining More...

Public Member Functions

 TweenParms ()
 Creates a new TweenParms object, which you can use to store tween settings to pass to multiple tweens via More...
 
TweenParms Clear ()
 Clears and resets this TweenParms instance using default values, so it can be reused without instantiating another one More...
 
TweenParms SetAutoKill (bool autoKillOnCompletion=true)
 Sets the autoKill behaviour of the tween. Has no effect if the tween has already started More...
 
TweenParms SetId (object id)
 Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. More...
 
TweenParms SetTarget (object target)
 Sets the target for the tween, which can then be used as a filter with DOTween's static methods. More...
 
TweenParms SetLoops (int loops, LoopType?loopType=null)
 Sets the looping options for the tween. Has no effect if the tween has already started More...
 
TweenParms SetRecyclable (bool recyclable=true)
 Sets the recycling behaviour for the tween. More...
 
TweenParms SetUpdate (bool isIndependentUpdate)
 Sets the update type to UpdateType.Default and lets you choose if it should be independent from Unity's Time.timeScale More...
 
TweenParms SetUpdate (UpdateType updateType, bool isIndependentUpdate=false)
 Sets the type of update (default or independent) for the tween More...
 
TweenParms OnStart (TweenCallback action)
 Sets the onStart callback for the tween. Called the first time the tween is set in a playing state, after any eventual delay More...
 
TweenParms OnPlay (TweenCallback action)
 Sets the onPlay callback for the tween. Called when the tween is set in a playing state, after any eventual delay. Also called each time the tween resumes playing from a paused state More...
 
TweenParms OnRewind (TweenCallback action)
 Sets the onRewind callback for the tween. Called when the tween is rewinded, either by calling More...
 
TweenParms OnUpdate (TweenCallback action)
 Sets the onUpdate callback for the tween. Called each time the tween updates More...
 
TweenParms OnStepComplete (TweenCallback action)
 Sets the onStepComplete callback for the tween. Called the moment the tween completes one loop cycle, even when going backwards More...
 
TweenParms OnComplete (TweenCallback action)
 Sets the onComplete callback for the tween. Called the moment the tween reaches its final forward position, loops included More...
 
TweenParms OnKill (TweenCallback action)
 Sets the onKill callback for the tween. Called the moment the tween is killed More...
 
TweenParms SetDelay (float delay)
 Sets a delayed startup for the tween. More...
 
TweenParms SetRelative (bool isRelative=true)
 If isRelative is TRUE sets the tween as relative (the endValue will be calculated as More...
 
TweenParms SetSpeedBased (bool isSpeedBased=true)
 If isSpeedBased is TRUE sets the tween as speed based (the duration will represent the number of units the tween moves x second). More...
 
TweenParms SetEase (Ease ease, float?overshootOrAmplitude=null, float?period=null)
 Sets the ease of the tween. More...
 
TweenParms SetEase (AnimationCurve animCurve)
 Sets the ease of the tween using an AnimationCurve. More...
 
TweenParms SetEase (EaseFunction customEase)
 Sets the ease of the tween using a custom ease function. More...
 

Static Public Attributes

static readonly TweenParms Parms = new TweenParms()
 A variable you can eventually Clear and reuse when needed, to avoid instantiating TweenParms objects More...
 

Detailed Description

This class serves only as a utility class to store tween settings to apply on multiple tweens. It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining

Constructor & Destructor Documentation

Creates a new TweenParms object, which you can use to store tween settings to pass to multiple tweens via

myTween.SetAs(myTweenParms)

Member Function Documentation

TweenParms Clear ( )

Clears and resets this TweenParms instance using default values, so it can be reused without instantiating another one

TweenParms OnComplete ( TweenCallback  action)

Sets the onComplete callback for the tween. Called the moment the tween reaches its final forward position, loops included

TweenParms OnKill ( TweenCallback  action)

Sets the onKill callback for the tween. Called the moment the tween is killed

TweenParms OnPlay ( TweenCallback  action)

Sets the onPlay callback for the tween. Called when the tween is set in a playing state, after any eventual delay. Also called each time the tween resumes playing from a paused state

TweenParms OnRewind ( TweenCallback  action)

Sets the onRewind callback for the tween. Called when the tween is rewinded, either by calling

Rewind or by reaching the start position while playing backwards. Rewinding a tween that is already rewinded will not fire this callback

TweenParms OnStart ( TweenCallback  action)

Sets the onStart callback for the tween. Called the first time the tween is set in a playing state, after any eventual delay

TweenParms OnStepComplete ( TweenCallback  action)

Sets the onStepComplete callback for the tween. Called the moment the tween completes one loop cycle, even when going backwards

TweenParms OnUpdate ( TweenCallback  action)

Sets the onUpdate callback for the tween. Called each time the tween updates

TweenParms SetAutoKill ( bool  autoKillOnCompletion = true)

Sets the autoKill behaviour of the tween. Has no effect if the tween has already started

Parameters
autoKillOnCompletionIf TRUE the tween will be automatically killed when complete
TweenParms SetDelay ( float  delay)

Sets a delayed startup for the tween.

Has no effect on Sequences or if the tween has already started

TweenParms SetEase ( Ease  ease,
float?  overshootOrAmplitude = null,
float?  period = null 
)

Sets the ease of the tween.

Has no effect on Sequences

Parameters
overshootOrAmplitudeEventual overshoot or amplitude to use with Back or Elastic easeType (default is 1.70158)
periodEventual period to use with Elastic easeType (default is 0)
TweenParms SetEase ( AnimationCurve  animCurve)

Sets the ease of the tween using an AnimationCurve.

Has no effect on Sequences

TweenParms SetEase ( EaseFunction  customEase)

Sets the ease of the tween using a custom ease function.

Has no effect on Sequences

TweenParms SetId ( object  id)

Sets an ID for the tween, which can then be used as a filter with DOTween's static methods.

Parameters
idThe ID to assign to this tween. Can be an int, a string, an object or anything else.
TweenParms SetLoops ( int  loops,
LoopType loopType = null 
)

Sets the looping options for the tween. Has no effect if the tween has already started

Parameters
loopsNumber of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence)
loopTypeLoop behaviour type (default: LoopType.Restart)
TweenParms SetRecyclable ( bool  recyclable = true)

Sets the recycling behaviour for the tween.

Parameters
recyclableIf TRUE the tween will be recycled after being killed, otherwise it will be destroyed.
TweenParms SetRelative ( bool  isRelative = true)

If isRelative is TRUE sets the tween as relative (the endValue will be calculated as

startValue + endValue instead than being used directly).

Has no effect on Sequences or if the tween has already started

TweenParms SetSpeedBased ( bool  isSpeedBased = true)

If isSpeedBased is TRUE sets the tween as speed based (the duration will represent the number of units the tween moves x second).

Has no effect on Sequences, nested tweens, or if the tween has already started

TweenParms SetTarget ( object  target)

Sets the target for the tween, which can then be used as a filter with DOTween's static methods.

IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead.

When using shorcuts the shortcut target is already assigned as the tween's target, so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly.

Parameters
targetThe target to assign to this tween. Can be an int, a string, an object or anything else.
TweenParms SetUpdate ( bool  isIndependentUpdate)

Sets the update type to UpdateType.Default and lets you choose if it should be independent from Unity's Time.timeScale

Parameters
isIndependentUpdateIf TRUE the tween will ignore Unity's Time.timeScale
TweenParms SetUpdate ( UpdateType  updateType,
bool  isIndependentUpdate = false 
)

Sets the type of update (default or independent) for the tween

Parameters
updateTypeThe type of update (defalt: UpdateType.Default)
isIndependentUpdateIf TRUE the tween will ignore Unity's Time.timeScale

Member Data Documentation

readonly TweenParms Parms = new TweenParms()
static

A variable you can eventually Clear and reuse when needed, to avoid instantiating TweenParms objects