本文整理汇总了Java中com.watabou.noosa.particles.PixelParticle类的典型用法代码示例。如果您正苦于以下问题:Java PixelParticle类的具体用法?Java PixelParticle怎么用?Java PixelParticle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PixelParticle类属于com.watabou.noosa.particles包,在下文中一共展示了PixelParticle类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void update() {
super.update();
if (Random.Float() < Game.elapsed) {
PixelParticle spark = (PixelParticle) sparks
.recycle(PixelParticle.Shrinking.class);
spark.reset(x, y, ColorMath.random(COLOR, 0x66FF66), 2,
Random.Float(0.5f, 1.0f));
spark.speed.set(Random.Float(-40, +40), Random.Float(-60, +20));
spark.acc.set(0, +80);
sparks.add(spark);
}
}
示例2: emit
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void emit(Emitter emitter, int index, float x, float y) {
PixelParticle p = (PixelParticle) emitter
.recycle(PixelParticle.Shrinking.class);
p.reset(x, y, color, 4, Random.Float(0.5f, 1.0f));
p.speed.polar(Random.Float(dir - cone / 2, dir + cone / 2),
Random.Float(40, 80));
p.acc.set(0, +100);
}
示例3: update
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void update() {
super.update();
if (Random.Float() < Game.elapsed) {
PixelParticle spark = (PixelParticle)sparks.recycle( PixelParticle.Shrinking.class );
spark.reset( x, y, ColorMath.random( COLOR, 0x66FF66 ), 2, Random.Float( 0.5f, 1.0f ) );
spark.speed.set(
Random.Float( -40, +40 ),
Random.Float( -60, +20 ) );
spark.acc.set( 0, +80 );
sparks.add( spark );
}
}
示例4: emit
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
PixelParticle p = (PixelParticle)emitter.recycle( PixelParticle.Shrinking.class );
p.reset( x, y, color, 4, Random.Float( 0.5f, 1.0f ) );
p.speed.polar( Random.Float( dir - cone / 2, dir + cone / 2 ), Random.Float( 40, 80 ) );
p.acc.set( 0, +100 );
}
示例5: update
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void update() {
super.update();
if (Random.Float() < Game.elapsed) {
PixelParticle spark = (PixelParticle)sparks.recycle( PixelParticle.Shrinking.class );
spark.reset( x, y, ColorMath.random( COLOR, 0x66FF66 ), 2, Random.Float( 0.5f, 1.0f ) );
spark.speed.set(
Random.Float( -40, +40 ),
Random.Float( -60, +20 ) );
spark.acc.set( 0, +80 );
sparks.add( spark );
}
}
示例6: emit
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
PixelParticle p = (PixelParticle)emitter.recycle( PixelParticle.Shrinking.class );
p.reset( x, y, color, 4, Random.Float( 0.5f, 1.0f ) );
p.speed.polar( Random.Float( dir - cone / 2, dir + cone / 2 ), Random.Float( 40, 60 ) );
p.acc.set( 0, +20 );
}
示例7: update
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void update() {
super.update();
if (Random.Float() < Game.elapsed) {
PixelParticle spark = (PixelParticle)sparks.recycle( PixelParticle.Shrinking.class );
spark.reset( x, y, ColorMath.random( COLOR, 0x66FF66 ), 2, Random.Float( 0.5f, 1.0f ) );
spark.speed.set(
Random.Float( -40, +40 ),
Random.Float( -60, +20 ) );
spark.acc.set( 0, +80 );
sparks.add( spark );
}
}
示例8: emit
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void emit(Emitter emitter, int index, float x, float y) {
PixelParticle p = (PixelParticle) emitter.recycle(PixelParticle.Shrinking.class);
p.reset(x, y, color, 4, Random.Float(0.5f, 1.0f));
p.speed.polar(Random.Float(dir - cone / 2, dir + cone / 2), Random.Float(40, 80));
p.acc.set(0, +100);
}
示例9: update
import com.watabou.noosa.particles.PixelParticle; //导入依赖的package包/类
@Override
public void update() {
super.update();
if (Random.Float() < Game.elapsed) {
PixelParticle spark = (PixelParticle)sparks.recycle( PixelParticle.Shrinking.class );
spark.reset( x, y, ColorMath.random( 0x000000, COLOR ), 2, Random.Float( 0.5f, 1.0f ) );
spark.speed.set(
Random.Float( -70, +40 ),
Random.Float( -60, +70 ) );
spark.acc.set( 0, +80 );
sparks.add( spark );
}
}