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

The following examples show how to use com.watabou.noosa.particles.Emitter#start() . 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: MagicTorch.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean cast(@NotNull Char chr){
	if (super.cast(chr)){
		castCallback(chr);
		Buff.affect(chr, com.watabou.pixeldungeon.actors.buffs.Light.class, 80);

		Emitter emitter = chr.getSprite().centerEmitter();
		emitter.start(FlameParticle.FACTORY, 0.2f, 3);
		return true;
	}
	return false;
}
 
Example 2
Source File: Torch.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void execute( Hero hero, String action ) {
	
	if (action.equals( AC_LIGHT )) {
		
		hero.spend( TIME_TO_LIGHT );
		hero.busy();
		
		hero.sprite.operate( hero.pos );
		
		detach( hero.belongings.backpack );
		Buff.affect( hero, Light.class, Light.DURATION );
		
		Emitter emitter = hero.sprite.centerEmitter();
		emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
		
	} else {
		
		super.execute( hero, action );
		
	}
}
 
Example 3
Source File: Torch.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void execute( Hero hero, String action ) {
	
	if (action == AC_LIGHT) {
		
		hero.spend( TIME_TO_LIGHT );
		hero.busy();
		
		hero.sprite.operate( hero.pos );
		
		detach( hero.belongings.backpack );
		Buff.affect( hero, Light.class, Light.DURATION );
		
		Emitter emitter = hero.sprite.centerEmitter();
		emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
		
	} else {
		
		super.execute( hero, action );
		
	}
}
 
Example 4
Source File: Torch.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void execute( Hero hero, String action ) {

	super.execute( hero, action );
	
	if (action.equals( AC_LIGHT )) {
		
		hero.spend( TIME_TO_LIGHT );
		hero.busy();
		
		hero.sprite.operate( hero.pos );
		
		detach( hero.belongings.backpack );
		
		Buff.affect(hero, Light.class, Light.DURATION);
		
		Emitter emitter = hero.sprite.centerEmitter();
		emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
		
	}
}
 
Example 5
Source File: Torch.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void execute(@NotNull Char chr, @NotNull String action ) {
	
	if (action.equals(AC_LIGHT)) {
		
		chr.spend( TIME_TO_LIGHT );
		chr.busy();
		
		chr.getSprite().operate( chr.getPos() );
		
		detach( chr.getBelongings().backpack );
		Buff.affect(chr, Light.class, Light.DURATION );
		
		Emitter emitter = chr.getSprite().centerEmitter();
		emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
		
	} else {
		
		super.execute(chr, action );
		
	}
}
 
Example 6
Source File: Torch.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void execute( Hero hero, String action ) {

	super.execute( hero, action );
	
	if (action.equals( AC_LIGHT )) {
		
		hero.spend( TIME_TO_LIGHT );
		hero.busy();
		
		hero.sprite.operate( hero.pos );
		
		detach( hero.belongings.backpack );
		
		Buff.affect(hero, Light.class, Light.DURATION);
		
		Emitter emitter = hero.sprite.centerEmitter();
		emitter.start( FlameParticle.FACTORY, 0.2f, 3 );
		
	}
}