Advertisement
Jiysea

Circular Zooming Effect

Jul 3rd, 2022
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. // ZoomCircle(OsbEasing.InOutBounce, "sb/circle.png", 93404, 96101, new Vector2(320, 240), new Vector2(80, 100), new Color4(200, 200, 200, 255), 0.12);
  2.  
  3. public void ZoomCircle(OsbEasing easing, String filepath, double startTime, double endTime, Vector2 startPos, Vector2 endPos, Color4 color, double scale)
  4.         {
  5.             var p = GetLayer("Foreground").CreateSprite(filepath, OsbOrigin.TopCentre);
  6.             p.Color(startTime, color);
  7.             p.Scale(easing, startTime, startTime + (int)Beatmap.GetTimingPointAt((int)startTime).BeatDuration * 2, scale, scale * 3.8488620892437813);
  8.             p.Rotate(easing, startTime, startTime + (int)Beatmap.GetTimingPointAt((int)startTime).BeatDuration * 2, MathHelper.DegreesToRadians(360), 0);
  9.             p.Move(easing, startTime, startTime + (int)Beatmap.GetTimingPointAt((int)startTime).BeatDuration * 2, startPos, endPos);
  10.             p.Move(OsbEasing.InCirc, endTime - (int)Beatmap.GetTimingPointAt((int)startTime).BeatDuration, endTime, endPos, startPos);
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement