本文整理汇总了Java中com.watabou.noosa.particles.Emitter类的典型用法代码示例。如果您正苦于以下问题:Java Emitter类的具体用法?Java Emitter怎么用?Java Emitter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Emitter类属于com.watabou.noosa.particles包,在下文中一共展示了Emitter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChildren
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
protected void createChildren() {
bar = new Image(asset, 0, 0, 64, 16);
add(bar);
width = bar.width;
height = bar.height;
hp = new Image(asset, 15, 19, 47, 4);
add(hp);
skull = new Image(asset, 5, 18, 6, 6);
add(skull);
blood = new Emitter();
blood.pos(skull);
blood.pour(BloodParticle.FACTORY, 0.3f);
blood.autoKill = false;
blood.on = false;
add(blood);
}
示例2: createChildren
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
protected void createChildren() {
bar = new Image(asset, 0, 0, 64, 16);
add(bar);
width = bar.width;
height = bar.height;
hp = new Image(asset, 15, 19, 47, 4);
add(hp);
skull = new Image(asset, 5, 18, 6, 6);
add(skull);
blood = new Emitter();
blood.pos(skull);
blood.pour(BloodParticle.FACTORY, 0.3f);
blood.autoKill = false;
blood.on = false;
add( blood );
}
示例3: link
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void link(Char ch) {
super.link(ch);
emitter = new Emitter();
emitter.autoKill = false;
emitter.pos(x + 7, y + 12);
parent.add(emitter);
}
示例4: link
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void link( Char ch ) {
super.link( ch );
emitter = new Emitter();
emitter.autoKill = false;
emitter.pos( x + 7, y + 12 );
parent.add( emitter );
}
示例5: createChildren
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
protected void createChildren() {
super.createChildren();
avatar = new Image(Assets.AVATARS);
add(avatar);
name = PixelScene.renderText(9);
add(name);
emitter = new Emitter();
add(emitter);
}
示例6: at
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
public static void at(PointF p, final int color, int n) {
if (n <= 0) {
return;
}
Emitter emitter = GameScene.emitter();
emitter.pos(p);
FACTORY.color = color;
FACTORY.dir = -3.1415926f / 2;
FACTORY.cone = 3.1415926f;
emitter.burst(FACTORY, n);
}
示例7: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
//reimplementing this is needed as instance creation of new staff particles must be within this class.
public void emit( Emitter emitter, int index, float x, float y ) {
StaffParticle c = (StaffParticle)emitter.getFirstAvailable(StaffParticle.class);
if (c == null) {
c = new StaffParticle();
emitter.add(c);
}
c.reset(x, y);
}
示例8: at
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
public static void at( PointF p, final int color, int n ) {
if (n <= 0) {
return;
}
Emitter emitter = GameScene.emitter();
emitter.pos( p );
FACTORY.color = color;
FACTORY.dir = -3.1415926f / 2;
FACTORY.cone = 3.1415926f;
emitter.burst( FACTORY, n );
}
示例9: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void emit(Emitter emitter, int index, float x, float y) {
LeafParticle p = ((LeafParticle) emitter
.recycle(LeafParticle.class));
p.color(ColorMath.random(0x004400, 0x88CC44));
p.reset(x, y);
}
示例10: update
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public synchronized void update() {
for (int i=0; i < length; i++) {
Gizmo g = members.get( i );
if (g != null && g.exists && g.active
//functionality for the freezing of emitters(particle effects), effects are given a second
//from load to get started so they aren't frozen before anything is generated.
&& !(freezeEmitters && Game.timeTotal > 1f && g instanceof Emitter)) {
g.update();
}
}
}
示例11: view
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
public ItemSprite view(Item item){
view(item.image(), item.glowing());
Emitter emitter = item.emitter();
if (emitter != null && parent != null) {
emitter.pos( this );
parent.add( emitter );
this.emitter = emitter;
}
return this;
}
示例12: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的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 );
}
示例13: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void emit(Emitter emitter, int index, float x, float y) {
((GooParticle) emitter.recycle(GooParticle.class)).reset(x, y);
}
示例14: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
((WindParticle)emitter.recycle( WindParticle.class )).reset( x, y );
}
示例15: emit
import com.watabou.noosa.particles.Emitter; //导入依赖的package包/类
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
((ShaftParticle)emitter.recycle( ShaftParticle.class )).reset( x, y );
}