Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorbiasot
- CommentTimeJun 5th 2009
Hi!
I modified Rain.as from examples:
addInitializer( new ImageClass( RadialDot, 6, 0x000000 ) );
addInitializer( new Position( new LineZone( new Point( 0, 0 ), new Point( 0, 130 ) ) ) );
addInitializer( new Velocity( new LineZone( new Point( 0, 0 ), new Point( 270, 0 ) ) ) );
// addInitializer( new ColorInit( 0xFF000000, 0xFFFFFFFF ) );
addAction(new MutualGravity(2, 10));
addInitializer(new Lifetime(0.3, 1));
addAction(new ColorChange(0xff000000,0xffffffff));
addAction(new Fade());
addAction(new Age());
addAction( new Move() );
addAction( new DeathZone( new RectangleZone( -10, -10, 270, 130 ), true ) );
addAction( new RotateToDirection() );
ColorChange is not working, regardless of ColorInit; if Fade is used then I got faded particles, if Fade is not used, then I got no visible particles :(
what I doing wrong?! ;-) -
- CommentAuthorRichard
- CommentTimeJun 10th 2009
The colorChange only works accurately with white particles, because it applies a color transform to the particle that will transform white to the selected color. Other colors will produce different effects, and black particles will stay black regardless of any color setting. That is the nature of the transform. So you need to initialize your particles as white dots -addInitializer( new ImageClass( RadialDot, 6, 0xFFFFFF ) );
1 to 2 of 2
