Guest User

Untitled

a guest
Dec 12th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         for (i in 0...18)
  2.         {
  3.             var o = new FireworkParticle();
  4.             o.Init(INGAME_PNG.GLIMMER_PNG());
  5.             o.holder = this;
  6.            
  7.             var angle = i * 20 * Math.PI / 180;
  8.  
  9.             o.AddMovement(Main.ROTATION, 0, 1*Math.PI, time);
  10.             o.AddRatioFilter(Filter.SQUARED, 1);
  11.             o.AddMovement(Main.ALPHA, 4, 0, time);
  12.            
  13.             o.xSpeed = Math.cos(angle) * 8;
  14.             o.ySpeed = Math.sin(angle) * 8;
  15.            
  16.             o.AddMovement(Main.X_SCALE, .3, .5, time);
  17.             o.AddRatioFilter(Filter.SQUARE_ROOT, 1);
  18.             o.AddMovement(Main.Y_SCALE, .3, .5, time);
  19.             o.AddRatioFilter(Filter.SQUARE_ROOT, 1);
  20.  
  21.            
  22.             o.r = (i % 2 == 0) ? fwR1 : fwR2;
  23.             o.g = (i % 2 == 0) ? fwG1 : fwG2;
  24.             o.b = (i % 2 == 0) ? fwB1 : fwB2;
  25.            
  26.             o.loc.x = o.lastX = loc.x;
  27.             o.loc.y = o.lastY = loc.y;
  28.             o.die = 1;
  29.             Main.thisMain.particleLayer.children.push(o);
  30.         }
Add Comment
Please, Sign In to add comment