PixelCrushers.Tweener Class Reference

General purpose tweener. More...

Inheritance diagram for PixelCrushers.Tweener:
Collaboration diagram for PixelCrushers.Tweener:

Public Types

enum  Easing {
  Linear , EaseIn , EaseOut , EaseInOut ,
  EaseInElastic , EaseOutElastic , EaseInOutElastic
}
 

Static Public Member Functions

static Coroutine Tween (float from, float to, float seconds, bool unscaledTime, Easing easing, System.Action onBegin, System.Action< float > onValue, System.Action onEnd)
 
static Coroutine Tween (Vector2 from, Vector2 to, float seconds, bool unscaledTime, Easing easing, System.Action onBegin, System.Action< Vector2 > onValue, System.Action onEnd)
 
static Coroutine Tween (Vector3 from, Vector3 to, float seconds, bool unscaledTime, Easing easing, System.Action onBegin, System.Action< Vector3 > onValue, System.Action onEnd)
 
static Coroutine Tween (Quaternion from, Quaternion to, float seconds, bool unscaledTime, Easing easing, System.Action onBegin, System.Action< Quaternion > onValue, System.Action onEnd)
 
static Coroutine Tween (Color from, Color to, float seconds, bool unscaledTime, Easing easing, System.Action onBegin, System.Action< Color > onValue, System.Action onEnd)
 

Properties

static Tweener Instance [get]
 

Detailed Description

General purpose tweener.

Example: fading out audio source volume over 0.2 seconds: var audioSource = GetComponent<AudioSource>(); Tweener.Tween(1, 0, 0.2f, false, Tweener.Easing.Linear, onBegin: null, onValue: (x) => audioSource.volume = x, onEnd: null);

Member Enumeration Documentation

◆ Easing

Enumerator
Linear 
EaseIn 
EaseOut 
EaseInOut 
EaseInElastic 
EaseOutElastic 
EaseInOutElastic 

Member Function Documentation

◆ Tween() [1/5]

static Coroutine PixelCrushers.Tweener.Tween ( Color  from,
Color  to,
float  seconds,
bool  unscaledTime,
Easing  easing,
System::Action  onBegin,
System::Action< Color >  onValue,
System::Action  onEnd 
)
inlinestatic

◆ Tween() [2/5]

static Coroutine PixelCrushers.Tweener.Tween ( float  from,
float  to,
float  seconds,
bool  unscaledTime,
Easing  easing,
System::Action  onBegin,
System::Action< float >  onValue,
System::Action  onEnd 
)
inlinestatic

◆ Tween() [3/5]

static Coroutine PixelCrushers.Tweener.Tween ( Quaternion  from,
Quaternion  to,
float  seconds,
bool  unscaledTime,
Easing  easing,
System::Action  onBegin,
System::Action< Quaternion >  onValue,
System::Action  onEnd 
)
inlinestatic

◆ Tween() [4/5]

static Coroutine PixelCrushers.Tweener.Tween ( Vector2  from,
Vector2  to,
float  seconds,
bool  unscaledTime,
Easing  easing,
System::Action  onBegin,
System::Action< Vector2 >  onValue,
System::Action  onEnd 
)
inlinestatic

◆ Tween() [5/5]

static Coroutine PixelCrushers.Tweener.Tween ( Vector3  from,
Vector3  to,
float  seconds,
bool  unscaledTime,
Easing  easing,
System::Action  onBegin,
System::Action< Vector3 >  onValue,
System::Action  onEnd 
)
inlinestatic

Property Documentation

◆ Instance

Tweener PixelCrushers.Tweener.Instance
staticget

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