Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void TestRun(String spritePath, double startTime, double endTime, float x, float y, float distance, double fadeOpac, Vector2 scale)
- {
- // float moving = 0;
- for (int angle = 0; angle < 360; angle += 6)
- {
- double startMove = startTime;
- float radian = MathHelper.DegreesToRadians(angle);
- var p = GetLayer("Foreground").CreateSprite(spritePath);
- p.Fade(startTime, fadeOpac);
- p.ScaleVec(startTime, scale);
- // for (double time = startTime; time < endTime; time += 150)
- // {
- float loopTimes = 360 / 6;
- double duration = (endTime - startTime) / loopTimes;
- for (int angle2 = 0; angle2 < 360; angle2 += 6)
- {
- float secRadian = MathHelper.DegreesToRadians(angle + angle2);
- float movRadian = secRadian + MathHelper.DegreesToRadians(6);
- p.Move(startMove, startMove + duration - 1, x + Math.Cos(secRadian) * (distance), y + Math.Sin(secRadian) * (distance),
- x + Math.Cos(movRadian) * (distance), y + Math.Sin(movRadian) * (distance));
- startMove += duration - 1;
- }
- // }
- p.Fade(endTime, 0);
- angle += 6;
- }
- }
Add Comment
Please, Sign In to add comment