private AnimationSet AnimateGhostEllipse(double ellipseX, double ellipseY) { double width = GhostCanvas.Width; double height = GhostCanvas.Height; double ElRadius = GhostEllipse.Width / 2; AnimationSet anim = GhostShadow.Scale((float)1.5, (float)1.5, (float)ElRadius, (float)ElRadius, 100).Then().Scale(1, 1, (float)ElRadius, (float)ElRadius, 100).Then().Offset(offsetX: (float)((ellipseX * width) - ElRadius), offsetY: (float)((ellipseY * height) - ElRadius), duration: 800, easingType: EasingType.Quadratic); return(anim); }
private AnimationSet AnimateChaosEllipse(double ellipseX, double ellipseY) { double width = ChaosCanvas.Width; double height = ChaosCanvas.Height; double ElRadius = ChaosEllipse.Width / 2; // Animations are hardcoded at 1000 ms now - so the durations need to add up to that AnimationSet anim = ChaosShadow.Scale((float)1.5, (float)1.5, (float)ElRadius, (float)ElRadius, 100).Then().Scale(1, 1, (float)ElRadius, (float)ElRadius, 100).Then().Offset(offsetX: (float)((ellipseX * width) - ElRadius), offsetY: (float)((ellipseY * height) - ElRadius), duration: 800, easingType: EasingType.Quadratic); return(anim); }