Esempio n. 1
0
 public TweenFX_RawImageAlpha(float start,
                              float end,
                              float duration,
                              EasingFunct easingFunct = null,
                              EffectType type         = EffectType.END) :
     base(start, end, duration, easingFunct, type, "TweenFX_RawImageAlpha")
 {
 }
Esempio n. 2
0
 public WIthVelocityFX_Y(float start,
                         float end,
                         float velocity,     // in units per second
                         EasingFunct easingFunct = null,
                         EffectType type         = EffectType.END) :
     base(start, end, velocity, easingFunct, type, "AtVelocityFX_Y")
 {
 }
Esempio n. 3
0
 public TweenFX_Scale(float start,
                      float end,
                      float duration,
                      EasingFunct easingFunct = null,
                      EffectType type         = EffectType.END) :
     base(start, end, duration, easingFunct, type, "TweenFX_Size")
 {
 }
Esempio n. 4
0
    private float _velocity;            // in units per second

    public WithVelocityFX(float start,
                          float end,
                          float velocity,
                          EasingFunct easingFunct = null,
                          EffectType type         = EffectType.END,
                          string effectName       = "WithVelocityFX") :
        base(start, end, float.NaN, easingFunct, type, effectName)
    {
        _velocity = velocity;
    }
Esempio n. 5
0
 //
 // used when changing values mid animation
 private void Recalibrate(float start,
                          float end,
                          float duration,
                          EasingFunct easingFunct)
 {
     _startTime   = Time.time;
     _start       = start;
     _end         = end;
     _duration    = duration;
     _easingFunct = easingFunct;
     _range       = _end - _start;
     _endTime     = _startTime + _duration;
     Update(_startTime);
 }
Esempio n. 6
0
 public TweenFX_XY(float endX,
                   float endY,
                   float duration,
                   EasingFunct easingFunctX = null,
                   EasingFunct easingFunctY = null,
                   EffectType type          = EffectType.END,
                   string effectName        = "TweenFX_XY") :
     base(null, effectName, type)
 {
     _endX         = endX;
     _endY         = endY;
     _duration     = duration;
     _easingFunctX = easingFunctX;
     _easingFunctY = easingFunctY;
 }
Esempio n. 7
0
 public WithVelocityFX_XY(float endX,
                          float endY,
                          float velocity,
                          EasingFunct easingFunctX = null,
                          EasingFunct easingFunctY = null,
                          EffectType type          = EffectType.END,
                          string effectName        = "WithVelocityFX_XY") :
     base(null, effectName, type)
 {
     _endX         = endX;
     _endY         = endY;
     _velocity     = velocity;
     _easingFunctX = easingFunctX;
     _easingFunctY = easingFunctY;
 }
Esempio n. 8
0
    private float _value;               // value of variable being tweened

    // NOTE: set start to NaN to start at existing value of target GameObject
    //       set end to NaN to end at existing value of target GameObject
    public TweenFX(float start,
                   float end,
                   float duration,
                   EasingFunct easingFunct = null,
                   EffectType type         = EffectType.END,
                   string effectName       = "TweenFX") :
        base(effectName, type)
    {
        _start       = start;
        _end         = end;
        _duration    = duration;
        _easingFunct = easingFunct;

        if (_easingFunct is null)
        {
            _easingFunct = NoEasing.EaseNone;
        }
    }