v0.7.5: improved visuals for Tengu's 3rd phase

This commit is contained in:
Evan Debenham 2019-09-29 03:38:44 -04:00
parent 92f198a9b0
commit 2f48f56063
3 changed files with 34 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -56,7 +56,6 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.TenguSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.TenguSprite;
@ -65,6 +64,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
@ -640,7 +640,7 @@ public class NewTengu extends Mob {
public void use(BlobEmitter emitter) { public void use(BlobEmitter emitter) {
super.use(emitter); super.use(emitter);
emitter.pour( SmokeParticle.FACTORY, 0.1f ); emitter.pour( SmokeParticle.FACTORY, 0.25f );
} }
@Override @Override
@ -676,8 +676,12 @@ public class NewTengu extends Mob {
} }
@Override @Override
public ItemSprite.Glowing glowing() { public Emitter emitter() {
return new ItemSprite.Glowing( 0xFF0000, 0.5f ); Emitter emitter = new Emitter();
emitter.pos(7.5f, 3.5f);
emitter.fillTarget = false;
emitter.pour(SmokeParticle.SPEW, 0.05f);
return emitter;
} }
} }
} }
@ -1038,8 +1042,12 @@ public class NewTengu extends Mob {
} }
@Override @Override
public ItemSprite.Glowing glowing() { public Emitter emitter() {
return new ItemSprite.Glowing( 0xFFFFFF, 0.5f ); Emitter emitter = new Emitter();
emitter.pos(5, 5);
emitter.fillTarget = false;
emitter.pour(SparkParticle.FACTORY, 0.1f);
return emitter;
} }
} }

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.effects.particles;
import com.watabou.noosa.particles.Emitter; import com.watabou.noosa.particles.Emitter;
import com.watabou.noosa.particles.Emitter.Factory; import com.watabou.noosa.particles.Emitter.Factory;
import com.watabou.noosa.particles.PixelParticle; import com.watabou.noosa.particles.PixelParticle;
import com.watabou.utils.PointF;
import com.watabou.utils.Random; import com.watabou.utils.Random;
public class SmokeParticle extends PixelParticle { public class SmokeParticle extends PixelParticle {
@ -35,6 +36,13 @@ public class SmokeParticle extends PixelParticle {
} }
}; };
public static final Factory SPEW = new Factory() {
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
((SmokeParticle)emitter.recycle( SmokeParticle.class )).resetSpew( x, y );
}
};
public SmokeParticle() { public SmokeParticle() {
super(); super();
@ -53,6 +61,18 @@ public class SmokeParticle extends PixelParticle {
speed.set( Random.Float( -4, +4 ), Random.Float( -8, +8 ) ); speed.set( Random.Float( -4, +4 ), Random.Float( -8, +8 ) );
} }
public void resetSpew( float x, float y ) {
revive();
this.x = x;
this.y = y;
acc.set( -40, 40 );
left = lifespan = Random.Float( 0.6f, 1f );
speed.polar( Random.Float(PointF.PI*1.7f, PointF.PI*1.8f), Random.Float( 30, 60 ));
}
@Override @Override
public void update() { public void update() {
super.update(); super.update();