Sequine - Scripting API
Calcatz.Sequine.Tween Class Reference

Runs and manages a single Tween. More...

Public Member Functions

delegate void TweenUpdateCallback (float t)
 
delegate void FloatTweenUpdateCallback (float value)
 
 Tween ()
 
 Tween (float _duration=1f, bool _timescaleIndependent=false, EasingFunction.Ease _easing=EasingFunction.Ease.EaseInOutQuad)
 
Coroutine RunTween (TweenUpdateCallback _onUpdate, Action _onComplete=null, float _overrideDuration=-1)
 Runs a tween. More...
 
Coroutine RunFloatTween (float _valueFrom, float _valueTo, FloatTweenUpdateCallback _onUpdate, Action _onComplete=null, float _overrideDuration=-1)
 Runs a float tween from a From to a To value. More...
 
IEnumerator RunTweenCoroutine (TweenUpdateCallback _onUpdate, Action _onComplete, float _overrideDuration=-1)
 
void Kill ()
 

Static Public Member Functions

static void CancelTween (Coroutine _coroutineHandle)
 

Public Attributes

float duration = 1f
 
bool timescaleIndependent
 
EasingFunction.Ease easing = EasingFunction.Ease.EaseInOutQuad
 

Detailed Description

Runs and manages a single Tween.

Constructor & Destructor Documentation

◆ Tween() [1/2]

Calcatz.Sequine.Tween.Tween ( )

◆ Tween() [2/2]

Calcatz.Sequine.Tween.Tween ( float  _duration = 1f,
bool  _timescaleIndependent = false,
EasingFunction.Ease  _easing = EasingFunction.Ease.EaseInOutQuad 
)

Member Function Documentation

◆ CancelTween()

static void Calcatz.Sequine.Tween.CancelTween ( Coroutine  _coroutineHandle)
static

◆ FloatTweenUpdateCallback()

delegate void Calcatz.Sequine.Tween.FloatTweenUpdateCallback ( float  value)

◆ Kill()

void Calcatz.Sequine.Tween.Kill ( )

◆ RunFloatTween()

Coroutine Calcatz.Sequine.Tween.RunFloatTween ( float  _valueFrom,
float  _valueTo,
FloatTweenUpdateCallback  _onUpdate,
Action  _onComplete = null,
float  _overrideDuration = -1 
)

Runs a float tween from a From to a To value.

Parameters
_valueFrom
_valueTo
_onUpdate
_onComplete
_overrideDuration
Returns

◆ RunTween()

Coroutine Calcatz.Sequine.Tween.RunTween ( TweenUpdateCallback  _onUpdate,
Action  _onComplete = null,
float  _overrideDuration = -1 
)

Runs a tween.

Parameters
_cancelTrackerAny reference object. This object will be used as the unique identifier for the CancelTween method.
_onUpdatet is the interpolation value from 0 to 1.
_onComplete
_overrideDuration

◆ RunTweenCoroutine()

IEnumerator Calcatz.Sequine.Tween.RunTweenCoroutine ( TweenUpdateCallback  _onUpdate,
Action  _onComplete,
float  _overrideDuration = -1 
)

◆ TweenUpdateCallback()

delegate void Calcatz.Sequine.Tween.TweenUpdateCallback ( float  t)

Member Data Documentation

◆ duration

float Calcatz.Sequine.Tween.duration = 1f

◆ easing

◆ timescaleIndependent

bool Calcatz.Sequine.Tween.timescaleIndependent