Skip to content

Commit

Permalink
refactoring acceleration name
Browse files Browse the repository at this point in the history
  • Loading branch information
plattysoft committed May 30, 2014
1 parent f36670c commit d009ad5
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ protected void onCreate(Bundle savedInstanceState) {

@Override
public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 80, R.drawable.confeti2, 10000);
ps.setSpeedModuleAndAngleRange(0f, 0.3f, 180, 180);
ps.setRotationSpeed(144);
ps.setVelocity(0.00005f, 90);
ps.emit(findViewById(R.id.emiter_top_right), 8);
new ParticleSystem(this, 80, R.drawable.confeti2, 10000)
.setSpeedModuleAndAngleRange(0f, 0.3f, 180, 180)
.setRotationSpeed(144)
.setAcceleration(0.00005f, 90)
.emit(findViewById(R.id.emiter_top_right), 8);

ParticleSystem ps2 = new ParticleSystem(this, 80, R.drawable.confeti3, 10000);
ps2.setSpeedModuleAndAngleRange(0f, 0.3f, 0, 0);
ps2.setRotationSpeed(144);
ps2.setVelocity(0.00005f, 90);
ps2.emit(findViewById(R.id.emiter_top_left), 8);
new ParticleSystem(this, 80, R.drawable.confeti3, 10000)
.setSpeedModuleAndAngleRange(0f, 0.3f, 0, 0)
.setRotationSpeed(144)
.setAcceleration(0.00005f, 90)
.emit(findViewById(R.id.emiter_top_left), 8);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ protected void onCreate(Bundle savedInstanceState) {

@Override
public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 4, R.drawable.dust, 3000);
ps.setSpeedByComponentsRange(-0.07f, 0.07f, -0.18f, -0.24f);
ps.setVelocity(0.00003f, 30);
ps.setInitialRotationRange(0, 360);
ps.addModifier(new AlphaModifier(255, 0, 1000, 3000));
ps.addModifier(new ScaleModifier(0.5f, 2f, 0, 1000));
ps.oneShot(findViewById(R.id.emiter_bottom), 4);
new ParticleSystem(this, 4, R.drawable.dust, 3000)
.setSpeedByComponentsRange(-0.07f, 0.07f, -0.18f, -0.24f)
.setAcceleration(0.00003f, 30)
.setInitialRotationRange(0, 360)
.addModifier(new AlphaModifier(255, 0, 1000, 3000))
.addModifier(new ScaleModifier(0.5f, 2f, 0, 1000))
.oneShot(findViewById(R.id.emiter_bottom), 4);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void onClick(View arg0) {
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedModuleAndAngleRange(0.2f, 0.5f, 0, 180);
ps.setRotationSpeedRange(90, 180);
ps.setVelocity(0.0004f, 90);
ps.setAcceleration(0.0004f, 90);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit(arg0, 100);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void onClick(View arg0) {
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedModuleAndAngleRange(0.2f, 0.5f, 0, 180);
ps.setRotationSpeedRange(90, 180);
ps.setVelocity(0.0004f, 90);
ps.setAcceleration(0.0004f, 90);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit(arg0, 100, 2000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedRange(0.2f, 0.5f);
ps.setVelocity(0.0002f, 90);
ps.setAcceleration(0.0002f, 90);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.oneShot(arg0, 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ protected void onCreate(Bundle savedInstanceState) {

@Override
public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);
ps.setSpeedRange(0.2f, 0.5f);
ps.oneShot(arg0, 100);
new ParticleSystem(this, 100, R.drawable.star_pink, 800)
.setSpeedRange(0.2f, 0.5f)
.oneShot(arg0, 100);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onClick(View arg0) {
new ParticleSystem(this, 10, R.drawable.star, 3000)
.setSpeedByComponentsRange(-0.3f, 0.3f, -0.3f, 0.1f)
.setVelocity(0.00001f, 90)
.setAcceleration(0.00001f, 90)
.setInitialRotationRange(0, 360)
.setRotationSpeed(120)
.setFadeOut(2000)
Expand Down

0 comments on commit d009ad5

Please sign in to comment.