本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.effects.particles.BloodParticle类的典型用法代码示例。如果您正苦于以下问题:Java BloodParticle类的具体用法?Java BloodParticle怎么用?Java BloodParticle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BloodParticle类属于com.shatteredpixel.shatteredpixeldungeon.effects.particles包,在下文中一共展示了BloodParticle类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChildren
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BloodParticle; //导入依赖的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: onHit
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BloodParticle; //导入依赖的package包/类
@Override
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
// lvl 0 - 10%
// lvl 1 - 18%
// lvl 2 - 25%
if (Random.Int( level() + 10 ) >= 9){
//grants a free use of the staff
freeCharge = true;
GLog.p( Messages.get(this, "charged") );
attacker.sprite.emitter().burst(BloodParticle.BURST, 20);
}
}
示例3: createChildren
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BloodParticle; //导入依赖的package包/类
@Override
protected void createChildren() {
shield = new NinePatch( Assets.STATUS, 80, 0, 30 + 18, 0 );
add( shield );
add( new TouchArea( 0, 1, 30, 30 ) {
@Override
protected void onClick( Touch touch ) {
Image sprite = Dungeon.hero.sprite;
if (!sprite.isVisible()) {
Camera.main.focusOn( sprite );
}
GameScene.show( new WndHero() );
};
} );
btnMenu = new MenuButton();
add( btnMenu );
avatar = HeroSprite.avatar( Dungeon.hero.heroClass, lastTier );
add( avatar );
blood = new Emitter();
blood.pos( avatar );
blood.pour( BloodParticle.FACTORY, 0.3f );
blood.autoKill = false;
blood.on = false;
add( blood );
compass = new Compass( Dungeon.level.exit );
add( compass );
hp = new Image( Assets.HP_BAR );
add( hp );
exp = new Image( Assets.XP_BAR );
add( exp );
level = new BitmapText( PixelScene.font1x );
level.hardlight( 0xFFEBA4 );
add( level );
depth = new BitmapText( Integer.toString( Dungeon.depth ), PixelScene.font1x );
depth.hardlight( 0xCACFC2 );
depth.measure();
add( depth );
Dungeon.hero.belongings.countIronKeys();
keys = new BitmapText( PixelScene.font1x );
keys.hardlight( 0xCACFC2 );
add( keys );
danger = new DangerIndicator();
add( danger );
resume = new ResumeIndicator();
add ( resume );
loot = new LootIndicator();
add( loot );
buffs = new BuffIndicator( Dungeon.hero );
add( buffs );
}