本文整理汇总了Java中com.watabou.noosa.particles.Emitter.burst方法的典型用法代码示例。如果您正苦于以下问题:Java Emitter.burst方法的具体用法?Java Emitter.burst怎么用?Java Emitter.burst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.watabou.noosa.particles.Emitter
的用法示例。
在下文中一共展示了Emitter.burst方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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 );
}
示例3: update
import com.watabou.noosa.particles.Emitter; //导入方法依赖的package包/类
@Override
public void update() {
super.update();
float health = Dungeon.hero.HP;
float shield = Dungeon.hero.SHLD;
float max = Math.max(health + shield, Dungeon.hero.HT);
if (!Dungeon.hero.isAlive()) {
avatar.tint(0x000000, 0.5f);
} else if ((health / max) < 0.3f) {
warning += Game.elapsed * 5f * (0.4f - (health / max));
warning %= 1f;
avatar.tint(ColorMath.interpolate(warning, 0x660000, 0xCC0000, 0x660000), 0.5f);
} else {
avatar.resetColor();
}
hp.scale.x = health / max;
this.shield.scale.x = (health + shield) / max;
exp.scale.x = (width / exp.width) * Dungeon.hero.exp
/ Dungeon.hero.maxExp();
if (Dungeon.hero.lvl != lastLvl) {
if (lastLvl != -1) {
Emitter emitter = (Emitter) recycle(Emitter.class);
emitter.revive();
emitter.pos(27, 27);
emitter.burst(Speck.factory(Speck.STAR), 12);
}
lastLvl = Dungeon.hero.lvl;
level.text(Integer.toString(lastLvl));
level.measure();
level.x = PixelScene.align(27.0f - level.width() / 2);
level.y = PixelScene.align(27.5f - level.baseLine() / 2);
}
int k = IronKey.curDepthQuantity;
if (k != lastKeys) {
lastKeys = k;
keys.text(Integer.toString(lastKeys));
keys.measure();
keys.x = width - 8 - keys.width() - 18;
}
int tier = Dungeon.hero.tier();
if (tier != lastTier) {
lastTier = tier;
avatar.copy(HeroSprite.avatar(Dungeon.hero.heroClass, tier));
}
}
示例4: update
import com.watabou.noosa.particles.Emitter; //导入方法依赖的package包/类
@Override
public void update() {
super.update();
float health = Dungeon.hero.HP;
float shield = Dungeon.hero.SHLD;
float max = Dungeon.hero.HT;
if (!Dungeon.hero.isAlive()) {
avatar.tint(0x000000, 0.5f);
} else if ((health/max) < 0.3f) {
warning += Game.elapsed * 5f *(0.4f - (health/max));
warning %= 1f;
avatar.tint(ColorMath.interpolate(warning, 0x660000, 0xCC0000, 0x660000), 0.5f );
} else {
avatar.resetColor();
}
hp.scale.x = Math.max( 0, (health-shield)/max);
shieldedHP.scale.x = health/max;
rawShielding.scale.x = shield/max;
exp.scale.x = (width / exp.width) * Dungeon.hero.exp / Dungeon.hero.maxExp();
if (Dungeon.hero.lvl != lastLvl) {
if (lastLvl != -1) {
Emitter emitter = (Emitter)recycle( Emitter.class );
emitter.revive();
emitter.pos( 27, 27 );
emitter.burst( Speck.factory( Speck.STAR ), 12 );
}
lastLvl = Dungeon.hero.lvl;
level.text( Integer.toString( lastLvl ) );
level.measure();
level.x = 27.5f - level.width() / 2f;
level.y = 28.0f - level.baseLine() / 2f;
PixelScene.align(level);
}
int tier = Dungeon.hero.tier();
if (tier != lastTier) {
lastTier = tier;
avatar.copy( HeroSprite.avatar( Dungeon.hero.heroClass, tier ) );
}
}
示例5: update
import com.watabou.noosa.particles.Emitter; //导入方法依赖的package包/类
@Override
public void update() {
super.update();
if (tagDanger != danger.visible || tagLoot != loot.visible || tagResume != resume.visible) {
tagDanger = danger.visible;
tagLoot = loot.visible;
tagResume = resume.visible;
layoutTags();
}
float health = (float)Dungeon.hero.HP / Dungeon.hero.HT;
if (health == 0) {
avatar.tint( 0x000000, 0.6f );
blood.on = false;
} else if (health < 0.25f) {
avatar.tint( 0xcc0000, 0.4f );
blood.on = true;
} else {
avatar.resetColor();
blood.on = false;
}
hp.scale.x = health;
exp.scale.x = (width / exp.width) * Dungeon.hero.exp / Dungeon.hero.maxExp();
if (Dungeon.hero.lvl != lastLvl) {
if (lastLvl != -1) {
Emitter emitter = (Emitter)recycle( Emitter.class );
emitter.revive();
emitter.pos( 27, 27 );
emitter.burst( Speck.factory( Speck.STAR ), 12 );
}
lastLvl = Dungeon.hero.lvl;
level.text( Integer.toString( lastLvl ) );
level.measure();
level.x = PixelScene.align( 27.5f - level.width() / 2 );
level.y = PixelScene.align( 28.0f - level.baseLine() / 2 );
}
int k = IronKey.curDepthQuantity;
if (k != lastKeys) {
lastKeys = k;
keys.text( Integer.toString( lastKeys ) );
keys.measure();
keys.x = width - 8 - keys.width() - 18;
}
int tier = Dungeon.hero.tier();
if (tier != lastTier) {
lastTier = tier;
avatar.copy( HeroSprite.avatar( Dungeon.hero.heroClass, tier ) );
}
}