@Override public Emitter emitter() { if (wand == null) return null; Emitter emitter = new Emitter(); emitter.pos(12.5f, 3); emitter.fillTarget = false; emitter.pour(StaffParticleFactory, 0.1f); return emitter; }
@Override public Emitter emitter() { if (wand == null) return null; Emitter emitter = new Emitter(); emitter.pos(12.5f, 3); emitter.fillTarget = false; emitter.pour(StaffParticleFactory, 0.1f); return emitter; }
@Override public void play( Animation anim, boolean force ) { super.play(anim, force); if (ch instanceof Goo && ((Goo)ch).phase && anim != die) { if (spray == null) { spray = emitter(); spray.pour( GooParticle.FACTORY, 0.05f ); } anim.delay = 1f / ENRAGE_FRAMERATE; } else { if (spray != null) { spray.on = false; spray = null; } anim.delay = 1f / NORMAL_FRAMERATE; } }
@Override public void link( Char ch ) { super.link( ch ); if (cloud == null) { cloud = emitter(); cloud.pour( Speck.factory( Speck.STENCH ), 0.7f ); } }
@Override public void link( Char ch ) { super.link( ch ); if (cloud == null) { cloud = emitter(); cloud.pour( Speck.factory( Speck.STENCH ), 0.7f ); } }
@Override public void link( Char ch ) { super.link( ch ); renderShadow = false; if (cloud == null) { cloud = emitter(); cloud.pour( Speck.factory(Speck.TOXIC), 0.7f ); } }
@Override public void link( Char ch ) { super.link( ch ); renderShadow = false; if (cloud == null) { cloud = emitter(); cloud.pour( Speck.factory(Speck.TOXIC), 0.7f ); } }
@Override public void link( Char ch ) { super.link( ch ); if (cloud == null) { cloud = emitter(); cloud.pour( Speck.factory( Speck.TOXIC ), 0.7f ); } }
@Override public Emitter emitter() { if (seal == null) return super.emitter(); Emitter emitter = new Emitter(); emitter.pos(ItemSpriteSheet.film.width(image)/2f + 2f, ItemSpriteSheet.film.height(image)/3f); emitter.fillTarget = false; emitter.pour(Speck.factory( Speck.RED_LIGHT ), 0.6f); return emitter; }
@Override public Emitter emitter() { if (seal == null) return super.emitter(); Emitter emitter = new Emitter(); emitter.pos(ItemSpriteSheet.film.width(image)/2f + 2f, ItemSpriteSheet.film.height(image)/3f); emitter.fillTarget = false; emitter.pour(Speck.factory( Speck.RED_LIGHT ), 0.6f); return emitter; }
case BURNING: burning = emitter(); burning.pour( FlameParticle.FACTORY, 0.06f ); if (visible) { Sample.INSTANCE.play( Assets.SND_BURNING ); case LEVITATING: levitation = emitter(); levitation.pour( Speck.factory( Speck.JET ), 0.02f ); break; case INVISIBLE: case CHILLED: chilled = emitter(); chilled.pour(SnowParticle.FACTORY, 0.1f); break; case DARKENED: case MARKED: marked = emitter(); marked.pour(ShadowParticle.UP, 0.1f); break; case HEALING: healing = emitter(); healing.pour(Speck.factory(Speck.HEALING), 0.5f); break; case SHIELDED:
@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 ); }
@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 ); }
emitter.pour( new Emitter.Factory() { @Override public void emit(Emitter emitter, int index, float x, float y) {
emitter.pour( new Emitter.Factory() { @Override public void emit(Emitter emitter, int index, float x, float y) {
emitter.pour( new Emitter.Factory() { @Override public void emit(Emitter emitter, int index, float x, float y) {
public EyeSprite() { super(); texture( Assets.EYE ); TextureFilm frames = new TextureFilm( texture, 16, 18 ); idle = new Animation( 8, true ); idle.frames( frames, 0, 1, 2 ); charging = new Animation( 12, true); charging.frames( frames, 3, 4 ); chargeParticles = centerEmitter(); chargeParticles.autoKill = false; chargeParticles.pour(MagicMissile.MagicParticle.ATTRACTING, 0.05f); chargeParticles.on = false; run = new Animation( 12, true ); run.frames( frames, 5, 6 ); attack = new Animation( 8, false ); attack.frames( frames, 4, 3 ); zap = attack.clone(); die = new Animation( 8, false ); die.frames( frames, 7, 8, 9 ); play( idle ); }
public EyeSprite() { super(); texture( Assets.EYE ); TextureFilm frames = new TextureFilm( texture, 16, 18 ); idle = new Animation( 8, true ); idle.frames( frames, 0, 1, 2 ); charging = new Animation( 12, true); charging.frames( frames, 3, 4 ); chargeParticles = centerEmitter(); chargeParticles.autoKill = false; chargeParticles.pour(MagicMissile.MagicParticle.ATTRACTING, 0.05f); chargeParticles.on = false; run = new Animation( 12, true ); run.frames( frames, 5, 6 ); attack = new Animation( 8, false ); attack.frames( frames, 4, 3 ); zap = attack.clone(); die = new Animation( 8, false ); die.frames( frames, 7, 8, 9 ); play( idle ); }
public GooSprite() { super(); texture( Assets.GOO ); TextureFilm frames = new TextureFilm( texture, 20, 14 ); idle = new Animation( 10, true ); idle.frames( frames, 2, 1, 0, 0, 1 ); run = new Animation( 15, true ); run.frames( frames, 3, 2, 1, 2 ); pump = new Animation( 20, true ); pump.frames( frames, 4, 3, 2, 1, 0 ); pumpAttack = new Animation ( 20, false ); pumpAttack.frames( frames, 4, 3, 2, 1, 0, 7); attack = new Animation( 10, false ); attack.frames( frames, 8, 9, 10 ); die = new Animation( 10, false ); die.frames( frames, 5, 6, 7 ); play(idle); spray = centerEmitter(); spray.autoKill = false; spray.pour( GooParticle.FACTORY, 0.04f ); spray.on = false; }
public GooSprite() { super(); texture( Assets.GOO ); TextureFilm frames = new TextureFilm( texture, 20, 14 ); idle = new Animation( 10, true ); idle.frames( frames, 2, 1, 0, 0, 1 ); run = new Animation( 15, true ); run.frames( frames, 3, 2, 1, 2 ); pump = new Animation( 20, true ); pump.frames( frames, 4, 3, 2, 1, 0 ); pumpAttack = new Animation ( 20, false ); pumpAttack.frames( frames, 4, 3, 2, 1, 0, 7); attack = new Animation( 10, false ); attack.frames( frames, 8, 9, 10 ); die = new Animation( 10, false ); die.frames( frames, 5, 6, 7 ); play(idle); spray = centerEmitter(); spray.autoKill = false; spray.pour( GooParticle.FACTORY, 0.04f ); spray.on = false; }