Example #1
0
 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();
 }
Example #2
0
 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();
 }
Example #3
0
        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)));
        }
Example #4
0
        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)));
        }
Example #5
0
 public Vector2ValueModifier(TweenSharedState <Vector2> sharedState)
 {
     _timeFromStart = 0;
     _sharedState   = sharedState;
 }
Example #6
0
 public FloatValueModifier(TweenSharedState <float> sharedState)
 {
     _timeFromStart = 0;
     _sharedState   = sharedState;
 }