예제 #1
0
 public ZoomCameraAnimation(Easing.Mode mode, TimeSpan duration, float start, float end) : base(mode, duration)
 {
     this.Start = start;
     this.End   = end;
 }
예제 #2
0
 public RelayCameraAnimation(Easing.Mode mode, TimeSpan duration, Action <Camera, double> update) : base(mode, duration)
 {
     this.update = update;
 }
예제 #3
0
 public MoveCameraAnimation(Easing.Mode mode, TimeSpan duration, Vector2 start, Vector2 end) : base(mode, duration)
 {
     this.Start = start;
     this.End   = end;
 }
 public static ICameraAnimationBuilder ThenMoveAndZoom(this ICameraAnimationBuilder builder, TimeSpan duration, Vector2 from, Vector2 to, float fromZ, float toZ, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(builder.Then(new MoveCameraAnimation(easing, duration, from, to), new ZoomCameraAnimation(easing, duration, fromZ, toZ)));
 }
예제 #5
0
 public CameraAnimation(Easing.Mode mode, TimeSpan duration)
 {
     this.Time     = 0;
     this.Easing   = mode;
     this.Duration = (long)duration.TotalMilliseconds;
 }
 public static ICameraAnimationBuilder ThenMove(this ICameraAnimationBuilder builder, TimeSpan duration, Vector2 from, Vector2 to, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(builder.Then(new MoveCameraAnimation(easing, duration, from, to)));
 }
 public static ICameraAnimationBuilder ThenZoom(this ICameraAnimationBuilder builder, TimeSpan duration, float from, float to, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(builder.Then(new ZoomCameraAnimation(easing, duration, from, to)));
 }
 public static ICameraAnimationBuilder Then(this ICameraAnimationBuilder builder, TimeSpan duration, Action <Camera, double> animation, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(builder.Then(new RelayCameraAnimation(easing, duration, animation)));
 }
 public static ICameraAnimationBuilder MoveAndZoom(this ICamera camera, TimeSpan duration, Vector2 from, Vector2 to, float fromZ, float toZ, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(camera.StartAnimation().ThenMoveAndZoom(duration, from, to, fromZ, toZ, easing));
 }
 public static ICameraAnimationBuilder Zoom(this ICamera camera, TimeSpan duration, float from, float to, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(camera.StartAnimation().ThenZoom(duration, from, to, easing));
 }
 public static ICameraAnimationBuilder Rotate(this ICamera camera, TimeSpan duration, float to, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(camera.StartAnimation().ThenRotate(duration, camera.Angle, to, easing));
 }
 public static ICameraAnimationBuilder Move(this ICamera camera, TimeSpan duration, Vector2 to, Easing.Mode easing = Easing.Mode.EaseBoth)
 {
     return(camera.StartAnimation().ThenMove(duration, camera.Position, to, easing));
 }