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


Java Emitter类代码示例

本文整理汇总了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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:22,代码来源:BossHealthBar.java

示例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 );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:22,代码来源:BossHealthBar.java

示例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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:10,代码来源:BlacksmithSprite.java

示例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 );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:10,代码来源:BlacksmithSprite.java

示例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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:15,代码来源:StartScene.java

示例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);
	}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:15,代码来源:Splash.java

示例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);
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:11,代码来源:MagesStaff.java

示例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 );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:15,代码来源:Splash.java

示例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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:8,代码来源:LeafParticle.java

示例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();
		}
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:13,代码来源:Group.java

示例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;
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:11,代码来源:ItemSprite.java

示例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 );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:9,代码来源:Splash.java

示例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);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:5,代码来源:PoisonGooSprite.java

示例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 );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:5,代码来源:WindParticle.java

示例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 );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:5,代码来源:ShaftParticle.java


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