Merging 1.9.1 source: sprite changes

This commit is contained in:
Evan Debenham 2015-11-09 14:04:04 -05:00 committed by Evan Debenham
parent e65602dba0
commit d894c7297f
4 changed files with 29 additions and 2 deletions

View File

@ -43,6 +43,7 @@ public class HeroSprite extends CharSprite {
private static TextureFilm tiers;
private Animation fly;
private Animation read;
public HeroSprite() {
super();
@ -81,6 +82,9 @@ public class HeroSprite extends CharSprite {
fly = new Animation( 1, true );
fly.frames( film, 18 );
read = new Animation( 20, false );
read.frames( film, 19, 20, 20, 20, 20, 20, 20, 20, 20, 19 );
}
@Override
@ -104,6 +108,17 @@ public class HeroSprite extends CharSprite {
play( fly );
}
public void read() {
animCallback = new Callback() {
@Override
public void call() {
idle();
ch.onOperateComplete();
}
};
play( read );
}
@Override
public void update() {
sleeping = ch.isAlive() && ((Hero)ch).resting;

View File

@ -259,6 +259,7 @@ public class ItemSprite extends MovieClip {
public static final Glowing WHITE = new Glowing( 0xFFFFFF, 0.6f );
public int color;
public float red;
public float green;
public float blue;
@ -269,6 +270,9 @@ public class ItemSprite extends MovieClip {
}
public Glowing( int color, float period ) {
this.color = color;
red = (color >> 16) / 255f;
green = ((color >> 8) & 0xFF) / 255f;
blue = (color & 0xFF) / 255f;

View File

@ -36,9 +36,12 @@ public class ShopkeeperSprite extends MobSprite {
idle = new Animation( 10, true );
idle.frames( film, 1, 1, 1, 1, 1, 0, 0, 0, 0 );
die = new Animation( 20, false );
die.frames( film, 0 );
run = idle.clone();
die = idle.clone();
attack = idle.clone();
idle();

View File

@ -26,6 +26,7 @@ import android.opengl.GLES20;
import com.watabou.noosa.Game;
import com.watabou.noosa.TextureFilm;
import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.Halo;
@ -72,6 +73,10 @@ public class WandmakerSprite extends MobSprite {
shield.putOut();
}
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
if (visible) {
Sample.INSTANCE.play( Assets.SND_BURNING );
}
}
public class Shield extends Halo {