本文整理汇总了Java中com.plattysoft.leonids.ParticleSystem.setScaleRange方法的典型用法代码示例。如果您正苦于以下问题:Java ParticleSystem.setScaleRange方法的具体用法?Java ParticleSystem.setScaleRange怎么用?Java ParticleSystem.setScaleRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.plattysoft.leonids.ParticleSystem
的用法示例。
在下文中一共展示了ParticleSystem.setScaleRange方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTouchEvent
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// Create a particle system and start emiting
ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedRange(0.05f, 0.1f);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit((int) event.getX(), (int) event.getY(), 40);
break;
case MotionEvent.ACTION_MOVE:
ps.updateEmitPoint((int) event.getX(), (int) event.getY());
break;
case MotionEvent.ACTION_UP:
ps.stopEmitting();
break;
}
return true;
}
示例2: onClick
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
@Override
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.1f, 0.25f);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.oneShot(arg0, 70);
ParticleSystem ps2 = new ParticleSystem(this, 100, R.drawable.star_white, 800);
ps2.setScaleRange(0.7f, 1.3f);
ps2.setSpeedRange(0.1f, 0.25f);
ps.setRotationSpeedRange(90, 180);
ps2.setFadeOut(200, new AccelerateInterpolator());
ps2.oneShot(arg0, 70);
}
示例3: finish_anim
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
public void finish_anim() {
Animation animFadein = AnimationUtils.loadAnimation(
getApplicationContext(), R.anim.slide_finish);
level_finished.setVisibility(View.VISIBLE);
animFadein.setAnimationListener(finish_anim);
level_finished.startAnimation(animFadein);
int count = screenH / 100;
for (int i = 0; i < count; i++) {
int id_image = 0;
if (i % 2 == 0)
id_image = R.drawable.star_pink;
else
id_image = R.drawable.star_white;
ParticleSystem ps = new ParticleSystem(this, 100, id_image, 800);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedRange(0.2f, 0.5f);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
int xStart = (int) (screenW * Math.random());
int yStart = (int) (screenH * Math.random());
ps.oneShot(xStart, yStart, 70);
}
final Animation scale = AnimationUtils.loadAnimation(
getApplicationContext(), R.anim.scale_anim);
homeBtn.startAnimation(scale);
Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3");
tracker.send(MapBuilder
.createEvent("Level", packName, "finish_drawing_" + level, null)
.build());
}
示例4: onClick
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
@Override
public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 1000);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedModuleAndAngleRange(0.07f, 0.16f, 0, 180);
ps.setRotationSpeedRange(90, 180);
ps.setAcceleration(0.00013f, 90);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit(arg0, 100, 2000);
}
示例5: onClick
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
@Override
public void onClick(View arg0) {
ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 1000);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedModuleAndAngleRange(0.07f, 0.16f, 0, 180);
ps.setRotationSpeedRange(90, 180);
ps.setAcceleration(0.00013f, 90);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit(arg0, 100);
}
示例6: onClick
import com.plattysoft.leonids.ParticleSystem; //导入方法依赖的package包/类
@Override
public void onClick(View arg0) {
// Launch 2 particle systems one for each image
ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_white_border, 800);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedRange(0.1f, 0.25f);
ps.setAcceleration(0.0001f, 90);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.oneShot(arg0, 100);
}