v0.2.3: added full attack and death animations to ghost sprite.
This commit is contained in:
parent
67a7bf0515
commit
8481daf252
BIN
assets/ghost.png
BIN
assets/ghost.png
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 512 B |
|
@ -10,9 +10,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.WraithSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
|
@ -76,7 +78,8 @@ public class DriedRose extends Artifact {
|
|||
|
||||
|
||||
GameScene.add(ghost, 1f);
|
||||
CellEmitter.get(ghost.pos).start(Speck.factory(Speck.LIGHT), 0.2f, 3);
|
||||
CellEmitter.get(ghost.pos).start( ShaftParticle.FACTORY, 0.3f, 4 );
|
||||
CellEmitter.get(ghost.pos).start( Speck.factory(Speck.LIGHT), 0.2f, 3 );
|
||||
|
||||
hero.spend(1f);
|
||||
hero.busy();
|
||||
|
@ -146,7 +149,7 @@ public class DriedRose extends Artifact {
|
|||
|
||||
{
|
||||
name = "sad ghost";
|
||||
spriteClass = WraithSprite.class;
|
||||
spriteClass = GhostSprite.class;
|
||||
|
||||
flying = true;
|
||||
|
||||
|
@ -219,7 +222,7 @@ public class DriedRose extends Artifact {
|
|||
//This is a bunch strings & string arrays, used in all of the sad ghost's voice lines.
|
||||
//************************************************************************************
|
||||
|
||||
public static final String GHOST_HELLO = "Hello again " + Dungeon.hero.className() + ".";
|
||||
//public static final String GHOST_HELLO = "Hello again " + Dungeon.hero.className() + ".";
|
||||
|
||||
//enum, for clarity.
|
||||
public static enum DEPTHS{
|
||||
|
@ -344,7 +347,7 @@ public class DriedRose extends Artifact {
|
|||
};
|
||||
|
||||
public static final String[] GHOST_VOICE_HEROKILLED = {
|
||||
Dungeon.hero.curAction + ", nooo...",
|
||||
", nooo...",
|
||||
"no...",
|
||||
"I couldn't help them..."
|
||||
};
|
||||
|
|
|
@ -40,9 +40,12 @@ public class GhostSprite extends MobSprite {
|
|||
|
||||
run = new Animation( 10, true );
|
||||
run.frames( frames, 0, 1 );
|
||||
|
||||
die = new Animation( 20, false );
|
||||
die.frames( frames, 0 );
|
||||
|
||||
attack = new Animation( 10, false );
|
||||
attack.frames( frames, 0, 2, 3 );
|
||||
|
||||
die = new Animation( 8, false );
|
||||
die.frames( frames, 0, 4, 5, 6, 7 );
|
||||
|
||||
play( idle );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user