Esempio n. 1
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)));
        }
Esempio n. 2
0
 public TweenPingPongStrategy(ITweenSharedState sharedState)
 {
     _style = TweenerPlayStyle.PingPong;
     _state = sharedState;
 }
Esempio n. 3
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)));
        }
Esempio n. 4
0
 public TweenOnceStrategy(ITweenSharedState sharedState)
 {
     _style = TweenerPlayStyle.Once;
     _state = sharedState;
 }