public TweenScaleStrategy(Transform target, ITweenSharedState sharedSharedState, IValueModifier <Vector2> modHandler, ITweenPlayStyleStrategy style) { _target = target; _mod = modHandler; _style = style; _sharedState = (TweenSharedState <Vector2>)sharedSharedState; _state = TweenComponentState.None; _remote = new TweenRemoteControl(); _style.InitializeState(); SubscribeToRemote(); }
public TweenAlphaStrategy(Graphic target, ITweenSharedState sharedState, IValueModifier <float> modHandler, ITweenPlayStyleStrategy style) { _target = target; _mod = modHandler; _style = style; _sharedState = (TweenSharedState <float>)sharedState; _state = TweenComponentState.None; _remote = new TweenRemoteControl(); _style.InitializeState(); SubscribeToRemote(); }
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 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 Vector2ValueModifier(TweenSharedState <Vector2> sharedState) { _timeFromStart = 0; _sharedState = sharedState; }
public FloatValueModifier(TweenSharedState <float> sharedState) { _timeFromStart = 0; _sharedState = sharedState; }