v0.2.4: resolved problems with goo, now using the new particle effect. Also tidied up Goo's description a bit.

This commit is contained in:
Evan Debenham 2015-02-15 05:56:59 -05:00
parent c817f454b9
commit 23eb797070
4 changed files with 8 additions and 52 deletions

View File

@ -1,16 +1,9 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.GooWarnParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.WindParticle;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite;
/**
* Created by Evan on 29/09/2014.
@ -19,6 +12,8 @@ public class GooWarn extends Blob {
//cosmetic blob, used to warn noobs that goo's pump up should, infact, be avoided.
//Thanks to Watabou for the much better particle effect, I was lazy and just re-colored flames initially
protected int pos;
@Override
@ -47,12 +42,12 @@ public class GooWarn extends Blob {
@Override
public void use( BlobEmitter emitter ) {
super.use( emitter );
emitter.start(GooWarnParticle.FACTORY, 0.05f, 0 );
emitter.pour(GooSprite.GooParticle.FACTORY, 0.03f );
}
@Override
public String tileDesc() {
return "Dark energy is building here!";
return "Specs of dark energy are swarming here!";
}
}

View File

@ -218,8 +218,8 @@ public class Goo extends Mob {
"Little is known about The Goo. It's quite possible that it is not even a creature, but rather a " +
"conglomerate of vile substances from the sewers that somehow gained basic intelligence. " +
"Regardless, dark magic is certainly what has allowed Goo to exist.\n\n" +
"You feel a chill just from being near Goo, its gelatinus nature has let it absorb lots of dark energy, " +
"you can feel it just from being near. If goo is able to attack with this energy you won't live for long.";
"Its gelatinous nature has let it absorb lots of dark energy, you feel a chill just from being near. " +
"If goo is able to attack with this energy you won't live for long.";
}
private final String PUMPEDUP = "pumpedup";

View File

@ -1,25 +0,0 @@
package com.shatteredpixel.shatteredpixeldungeon.effects.particles;
import com.watabou.noosa.particles.Emitter;
/**
* Created by Evan on 30/09/2014.
*/
public class GooWarnParticle extends FlameParticle {
public static final Emitter.Factory FACTORY = new Emitter.Factory() {
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
((GooWarnParticle)emitter.recycle( GooWarnParticle.class )).reset( x, y );
}
};
@Override
public void update() {
super.update();
float p = left / lifespan;
color( 0x000000 );
am = p > 0.5f ? (1.2f - p*0.8f) : (p*3 - 0.7f);
}
}

View File

@ -30,9 +30,6 @@ public class GooSprite extends MobSprite {
private Animation pump;
private Animation pumpAttack;
private Animation jump;
private Emitter spray;
public GooSprite() {
super();
@ -53,9 +50,6 @@ public class GooSprite extends MobSprite {
pumpAttack = new Animation ( 20, false );
pumpAttack.frames( frames, 4, 3, 2, 1, 0, 7);
jump = new Animation( 1, true );
jump.frames( frames, 6 );
attack = new Animation( 10, false );
attack.frames( frames, 8, 9, 10 );
@ -74,14 +68,6 @@ public class GooSprite extends MobSprite {
@Override
public void play( Animation anim, boolean force ) {
super.play( anim, force );
if (anim == pump) {
spray = centerEmitter();
spray.pour( GooParticle.FACTORY, 0.04f );
} else if (spray != null) {
spray.on = false;
spray = null;
}
}
@Override