Advertisement
Jiysea

Homework

May 28th, 2022 (edited)
1,069
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void Exploooooosion(String spritePath, double startTime, double endTime, float startX, float startY, float endX, float endY, float startDistance, float endDistance, double fadeOpac, int angleGap, Vector2 startScale, Vector2 endScale)
  2.         {
  3.             for (int angle = 0; angle < 360; angle += angleGap)
  4.             {
  5.                 float radian = MathHelper.DegreesToRadians(angle);
  6.                 var p = GetLayer("Foreground").CreateSprite(spritePath);
  7.                 p.Fade(startTime, fadeOpac);
  8.                 p.ScaleVec(startTime, endTime, startScale, endScale);
  9.  
  10.                 p.Move(startTime, endTime, startX + Math.Cos(radian) * (startDistance), startY + Math.Sin(radian) * (startDistance),
  11.                                            endX + Math.Cos(radian) * (endDistance), endY + Math.Sin(radian) * (endDistance));
  12.  
  13.                 p.Fade(endTime, 0);
  14.             }
  15.         }
Advertisement
RAW Paste Data Copied
Advertisement