public static ITweenComponentStrategy Create(Graphic target, float toValue, float duration, TweenerPlayStyle style) { TweenSharedState <float> state = new TweenSharedState <float>() { FromValue = target.GetAlpha(), ToValue = toValue, Duration = duration }; return(new TweenAlphaStrategy( target, state, new FloatValueModifier(state), CreatePlayStyle(state, style))); }
public TweenPingPongStrategy(ITweenSharedState sharedState) { _style = TweenerPlayStyle.PingPong; _state = sharedState; }
public static ITweenComponentStrategy Create(Transform target, Vector2 toValue, float duration, TweenerPlayStyle style) { TweenSharedState <Vector2> state = new TweenSharedState <Vector2>() { FromValue = target.localScale, ToValue = toValue, Duration = duration }; return(new TweenScaleStrategy( target, state, new Vector2ValueModifier(state), CreatePlayStyle(state, style))); }
public TweenOnceStrategy(ITweenSharedState sharedState) { _style = TweenerPlayStyle.Once; _state = sharedState; }