public TweenFX_RawImageAlpha(float start, float end, float duration, EasingFunct easingFunct = null, EffectType type = EffectType.END) : base(start, end, duration, easingFunct, type, "TweenFX_RawImageAlpha") { }
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") { }
public TweenFX_Scale(float start, float end, float duration, EasingFunct easingFunct = null, EffectType type = EffectType.END) : base(start, end, duration, easingFunct, type, "TweenFX_Size") { }
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; }
// // 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); }
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; }
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; }
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; } }