Java Code Examples for com.watabou.noosa.particles.Emitter#pour()

The following examples show how to use com.watabou.noosa.particles.Emitter#pour() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LotusSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void link( Char ch ) {
	super.link( ch );

	renderShadow = false;

	if (grassVfx == null && ch instanceof WandOfRegrowth.Lotus){
		WandOfRegrowth.Lotus l = (WandOfRegrowth.Lotus) ch;
		grassVfx = new ArrayList<>();
		for (int i = 0; i < Dungeon.level.length(); i++){
			if (!Dungeon.level.solid[i] && l.inRange(i)) {
				Emitter e = CellEmitter.get(i);
				e.pour(LeafParticle.LEVEL_SPECIFIC, 0.5f);
				grassVfx.add(e);
			}
		}
	}
}
 
Example 2
Source File: BossHealthBar.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 6 votes vote down vote up
@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 );
}
 
Example 3
Source File: BossHealthBar.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void createChildren() {
	bar = new Image(asset, 0, 0, 64, 16);
	add(bar);

	width = bar.width;
	height = bar.height;

	rawShielding = new Image(asset, 15, 25, 47, 4);
	rawShielding.alpha(0.5f);
	add(rawShielding);

	shieldedHP = new Image(asset, 15, 25, 47, 4);
	add(shieldedHP);

	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 );
}
 
Example 4
Source File: StatusPane.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void createChildren() {

	shield = new NinePatch( Assets.STATUS, 80, 0, 30   + 18, 0 );
	add( shield );

	add( new TouchArea( 0, 1, 31, 31 ) {
		@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 );

	buffs = new BuffIndicator( Dungeon.hero );
	add( buffs );
}
 
Example 5
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( FlameParticle.FACTORY, 0.06f );
	return emitter;
}
 
Example 6
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( LeafParticle.GENERAL, 0.06f );
	return emitter;
}
 
Example 7
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour(Speck.factory(Speck.TOXIC), 0.25f );
	return emitter;
}
 
Example 8
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour(CorrosionParticle.MISSILE, 0.06f );
	return emitter;
}
 
Example 9
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour(SparkParticle.STATIC, 0.06f );
	return emitter;
}
 
Example 10
Source File: FistSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour(ShadowParticle.MISSILE, 0.06f );
	return emitter;
}
 
Example 11
Source File: ElementalSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( FlameParticle.FACTORY, 0.06f );
	return emitter;
}
 
Example 12
Source File: ElementalSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( ElmoParticle.FACTORY, 0.06f );
	return emitter;
}
 
Example 13
Source File: ElementalSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( MagicMissile.MagicParticle.FACTORY, 0.06f );
	return emitter;
}
 
Example 14
Source File: ElementalSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( SparkParticle.STATIC, 0.06f );
	return emitter;
}
 
Example 15
Source File: ElementalSprite.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Emitter createEmitter() {
	Emitter emitter = emitter();
	emitter.pour( RainbowParticle.BURST, 0.025f );
	return emitter;
}
 
Example 16
Source File: StatusPane.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void createChildren() {

    shield = new NinePatch(Assets.getStatus(), 80, 0, 30 + 18, 0);
    add(shield);

    add(new TouchArea(0, 1, 30, 30) {
        @Override
        protected void onClick(Touch touch) {
            Image sprite = hero.getSprite();
            if (!sprite.isVisible()) {
                Camera.main.focusOn(sprite);
            }
            GameScene.show(new WndHero());
        }
    });

    avatar = hero.getSprite().avatar();
    add(avatar);

    blood = new Emitter();
    blood.pos(avatar);
    blood.pour(BloodParticle.FACTORY, 0.3f);
    blood.autoKill = false;
    blood.on = false;
    add(blood);

    int compassTarget = currentLevel.entrance;

    if (currentLevel.hasCompassTarget()) {
        compassTarget = currentLevel.getCompassTarget();    // Set to compass target if exists
    } else if ( currentLevel.hasExit(0)
                && hero.getBelongings().getItem(Amulet.class) == null) {
        compassTarget = currentLevel.getExit(0);    // Set to first exit if exists
    }

    compass = new Compass(compassTarget, currentLevel);
    add(compass);


    hp = new Image(Assets.HP_BAR);
    add(hp);

    sp = new Image(Assets.SP_BAR);
    add(sp);

    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);
    add(depth);

    hero.getBelongings().countIronKeys();
    keys = new BitmapText(PixelScene.font1x);
    keys.hardlight(0xCACFC2);
    add(keys);

    danger = new DangerIndicator();
    add(danger);

    loot = new LootIndicator();
    add(loot);

    buffs = new BuffIndicator(hero);
    add(buffs);

    btnMenu = new MenuButton(new Image(Assets.getStatus(), 114, 3, 12, 11), WndGame.class);
    add(btnMenu);

    btnHats = new MenuButton(new Image(Assets.getStatus(), 114, 18, 12, 11), WndHats.class);

    if (!Flavours.haveHats()) {
        btnHats.enable(false);
    }

    add(btnHats);
}