plattysoft / Leonids

A Particle System for standard Android UI: http://plattysoft.github.io/Leonids/
Apache License 2.0
2.28k stars 398 forks source link

EmiterWithGravityExampleActivity ,How to make particles fly upward? #101

Closed RookieExaminer closed 6 years ago

RookieExaminer commented 6 years ago

new ParticleSystem(this, 100, R.drawable.star_pink, 3000) .setAcceleration(0.00013f, 90) .setSpeedByComponentsRange(0f, 0f, 0.05f, 0.1f) .setFadeOut(200, new AccelerateInterpolator()) .emitWithGravity(arg0, Gravity.TOP, 30);

How to make particles fly upward? Thank you

RookieExaminer commented 6 years ago

.setAcceleration(0.00013f, 270) or .setAccelerationModuleAndAndAngleRange(0.00013f, 0.00013f, 250,280)