Пример #1
0
 public static AnimationSequence <T> SclTo <T>(this AnimationSequence <T> sequence, float v, double duration = 0, int esType = 0) where T : Drawable
 {
     sequence.Append(new SclTask(sequence.target, duration, esType)
     {
         end = new Vec2(v, v), setStartFromTarget = true
     }); return(sequence);
 }
Пример #2
0
        public static AnimationSequence <T> Insert <T>(this AnimationSequence <T> sequence, System.Action <AnimationSequence <T> > generator) where T : Drawable
        {
            var s = new AnimationSequence <T>(sequence.target); generator(s);

            sequence.Append(s);
            return(sequence);
        }
Пример #3
0
 public static AnimationSequence Call(this AnimationSequence seq, System.Action action)
 {
     seq.Append(new CallTask {
         action = action
     });
     return(seq);
 }
Пример #4
0
 public static AnimationSequence Set <T>(this AnimationSequence seq, ISettable <T> settable, T value)
 {
     seq.Append(new SetTask <T> {
         settable = settable, value = value
     });
     return(seq);
 }
Пример #5
0
 public static AnimationSequence <T> AlphaTo <T>(this AnimationSequence <T> sequence, float a, double duration = 0, int esType = 0) where T : Drawable
 {
     sequence.Append(new AlphaTask(sequence.target, duration, esType)
     {
         end = a, setStartFromTarget = true
     }); return(sequence);
 }
Пример #6
0
 public static AnimationSequence FadeOutFromOne(this AnimationSequence seq, Graphic target, float duration, int esType)
 {
     seq.Append(new FloatSettableTask(new GraphicAlphaFloatSettable(target), duration, esType)
     {
         start = 1, end = 0
     });
     return(seq);
 }
Пример #7
0
 public static AnimationSequence FadeIn(this AnimationSequence seq, Graphic target, float duration, int esType)
 {
     seq.Append(new FloatSettableTask(new GraphicAlphaFloatSettable(target), duration, esType)
     {
         end = 1, setStartFromTarget = true
     });
     return(seq);
 }
Пример #8
0
 public static AnimationSequence FadeFromTo(this AnimationSequence seq, Graphic target, Color a, Color b, float duration, int esType)
 {
     seq.Append(new ColorSettableTask(new GraphicColorSettable(target), duration, esType)
     {
         start = a, end = b
     });
     return(seq);
 }
Пример #9
0
 public static AnimationSequence MoveFromTo(this AnimationSequence seq, RectTransform target, Vector2 a, Vector2 b, float duration, int esType)
 {
     seq.Append(new Vector2SettableTask(new RectTransformAnchoredPositionVector2Settable(target), duration, esType)
     {
         start = a, end = b
     });
     return(seq);
 }
Пример #10
0
 public static AnimationSequence EditTo(this AnimationSequence seq, Text target, string a, float duration, int esType)
 {
     seq.Append(new StringSettableTask(new TextStringSettable(target), duration, esType)
     {
         end = a, setStartFromTarget = true
     });
     return(seq);
 }
Пример #11
0
 public static AnimationSequence FadeInFromZero(this AnimationSequence seq, CanvasGroup target, float duration, int esType)
 {
     seq.Append(new FloatSettableTask(new CanvasGroupAlphaFloatSettable(target), duration, esType)
     {
         start = 0, end = 1
     });
     return(seq);
 }
Пример #12
0
 public static AnimationSequence FadeOut(this AnimationSequence seq, CanvasGroup target, float duration, int esType)
 {
     seq.Append(new FloatSettableTask(new CanvasGroupAlphaFloatSettable(target), duration, esType)
     {
         end = 0, setStartFromTarget = true
     });
     return(seq);
 }
Пример #13
0
 public static AnimationSequence FlashFrom(this AnimationSequence seq, CanvasGroup target, float a, float duration, int esType)
 {
     seq.Append(new FloatSettableTask(new CanvasGroupAlphaFloatSettable(target), duration, esType)
     {
         start = a, setEndFromTarget = true
     });
     return(seq);
 }
Пример #14
0
 public static AnimationSequence ScaleFromTo(this AnimationSequence seq, Transform target, Vector3 a, Vector3 b, float duration, int esType)
 {
     seq.Append(new Vector3SettableTask(new TransformLocalScaleVector3Settable(target), duration, esType)
     {
         start = a, end = b
     });
     return(seq);
 }
Пример #15
0
 public static AnimationSequence <T> Rot <T>(this AnimationSequence <T> sequence, float r, double duration = 0, int esType = 0) where T : Drawable
 {
     sequence.Append(new RotTask(sequence.target, duration, esType)
     {
         delta = r, isRelative = true
     });
     return(sequence);
 }
Пример #16
0
 public static AnimationSequence ShiftTo(this AnimationSequence seq, RectTransform target, Vector2 a, float duration, int esType)
 {
     seq.Append(new Vector2SettableTask(new RectTransformAnchoredPositionVector2Settable(target), duration, esType)
     {
         delta = a, isRelative = true
     });
     return(seq);
 }
Пример #17
0
 public static AnimationSequence FadeTo(this AnimationSequence seq, Graphic target, Color a, float duration, int esType)
 {
     seq.Append(new ColorSettableTask(new GraphicColorSettable(target), duration, esType)
     {
         end = a, setStartFromTarget = true
     });
     return(seq);
 }
Пример #18
0
 public static AnimationSequence <T> Insert <T>(this AnimationSequence <T> sequence, AnimationSequence s) where T : Drawable
 {
     sequence.Append(s);
     return(sequence);
 }