当前位置: 首页>>代码示例>>Java>>正文


Java ParticleSystem.setFadeOut方法代码示例

本文整理汇总了Java中com.plattysoft.leonids.ParticleSystem.setFadeOut方法的典型用法代码示例。如果您正苦于以下问题:Java ParticleSystem.setFadeOut方法的具体用法?Java ParticleSystem.setFadeOut怎么用?Java ParticleSystem.setFadeOut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.plattysoft.leonids.ParticleSystem的用法示例。


在下文中一共展示了ParticleSystem.setFadeOut方法的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;
}
 
开发者ID:plattysoft,项目名称:Leonids,代码行数:22,代码来源:FollowCursorExampleActivity.java

示例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);
}
 
开发者ID:plattysoft,项目名称:Leonids,代码行数:17,代码来源:FireworksExampleActivity.java

示例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());

}
 
开发者ID:AlexZaiats,项目名称:Coloring-book,代码行数:40,代码来源:DrawerActivity.java

示例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);
}
 
开发者ID:plattysoft,项目名称:Leonids,代码行数:11,代码来源:EmiterTimeLimitedExampleActivity.java

示例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);
}
 
开发者ID:plattysoft,项目名称:Leonids,代码行数:11,代码来源:EmiterIntermediateExampleActivity.java

示例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);
}
 
开发者ID:plattysoft,项目名称:Leonids,代码行数:12,代码来源:OneShotAdvancedExampleActivity.java


注:本文中的com.plattysoft.leonids.ParticleSystem.setFadeOut方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。