示例#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
文件: CallTask.cs 项目: DotLab/Uif
 public static AnimationSequence Call(this AnimationSequence seq, System.Action action)
 {
     seq.Append(new CallTask {
         action = action
     });
     return(seq);
 }
示例#4
0
文件: SetTask.cs 项目: DotLab/Uif
 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);
 }