Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i in 0...18)
- {
- var o = new FireworkParticle();
- o.Init(INGAME_PNG.GLIMMER_PNG());
- o.holder = this;
- var angle = i * 20 * Math.PI / 180;
- o.AddMovement(Main.ROTATION, 0, 1*Math.PI, time);
- o.AddRatioFilter(Filter.SQUARED, 1);
- o.AddMovement(Main.ALPHA, 4, 0, time);
- o.xSpeed = Math.cos(angle) * 8;
- o.ySpeed = Math.sin(angle) * 8;
- o.AddMovement(Main.X_SCALE, .3, .5, time);
- o.AddRatioFilter(Filter.SQUARE_ROOT, 1);
- o.AddMovement(Main.Y_SCALE, .3, .5, time);
- o.AddRatioFilter(Filter.SQUARE_ROOT, 1);
- o.r = (i % 2 == 0) ? fwR1 : fwR2;
- o.g = (i % 2 == 0) ? fwG1 : fwG2;
- o.b = (i % 2 == 0) ? fwB1 : fwB2;
- o.loc.x = o.lastX = loc.x;
- o.loc.y = o.lastY = loc.y;
- o.die = 1;
- Main.thisMain.particleLayer.children.push(o);
- }
Add Comment
Please, Sign In to add comment