Merging 1.9.1 source: sprite changes
This commit is contained in:
parent
e65602dba0
commit
d894c7297f
|
@ -43,6 +43,7 @@ public class HeroSprite extends CharSprite {
|
||||||
private static TextureFilm tiers;
|
private static TextureFilm tiers;
|
||||||
|
|
||||||
private Animation fly;
|
private Animation fly;
|
||||||
|
private Animation read;
|
||||||
|
|
||||||
public HeroSprite() {
|
public HeroSprite() {
|
||||||
super();
|
super();
|
||||||
|
@ -81,6 +82,9 @@ public class HeroSprite extends CharSprite {
|
||||||
|
|
||||||
fly = new Animation( 1, true );
|
fly = new Animation( 1, true );
|
||||||
fly.frames( film, 18 );
|
fly.frames( film, 18 );
|
||||||
|
|
||||||
|
read = new Animation( 20, false );
|
||||||
|
read.frames( film, 19, 20, 20, 20, 20, 20, 20, 20, 20, 19 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -104,6 +108,17 @@ public class HeroSprite extends CharSprite {
|
||||||
play( fly );
|
play( fly );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void read() {
|
||||||
|
animCallback = new Callback() {
|
||||||
|
@Override
|
||||||
|
public void call() {
|
||||||
|
idle();
|
||||||
|
ch.onOperateComplete();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
play( read );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
sleeping = ch.isAlive() && ((Hero)ch).resting;
|
sleeping = ch.isAlive() && ((Hero)ch).resting;
|
||||||
|
|
|
@ -259,6 +259,7 @@ public class ItemSprite extends MovieClip {
|
||||||
|
|
||||||
public static final Glowing WHITE = new Glowing( 0xFFFFFF, 0.6f );
|
public static final Glowing WHITE = new Glowing( 0xFFFFFF, 0.6f );
|
||||||
|
|
||||||
|
public int color;
|
||||||
public float red;
|
public float red;
|
||||||
public float green;
|
public float green;
|
||||||
public float blue;
|
public float blue;
|
||||||
|
@ -269,6 +270,9 @@ public class ItemSprite extends MovieClip {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Glowing( int color, float period ) {
|
public Glowing( int color, float period ) {
|
||||||
|
|
||||||
|
this.color = color;
|
||||||
|
|
||||||
red = (color >> 16) / 255f;
|
red = (color >> 16) / 255f;
|
||||||
green = ((color >> 8) & 0xFF) / 255f;
|
green = ((color >> 8) & 0xFF) / 255f;
|
||||||
blue = (color & 0xFF) / 255f;
|
blue = (color & 0xFF) / 255f;
|
||||||
|
|
|
@ -37,8 +37,11 @@ public class ShopkeeperSprite extends MobSprite {
|
||||||
idle = new Animation( 10, true );
|
idle = new Animation( 10, true );
|
||||||
idle.frames( film, 1, 1, 1, 1, 1, 0, 0, 0, 0 );
|
idle.frames( film, 1, 1, 1, 1, 1, 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
die = new Animation( 20, false );
|
||||||
|
die.frames( film, 0 );
|
||||||
|
|
||||||
run = idle.clone();
|
run = idle.clone();
|
||||||
die = idle.clone();
|
|
||||||
attack = idle.clone();
|
attack = idle.clone();
|
||||||
|
|
||||||
idle();
|
idle();
|
||||||
|
|
|
@ -26,6 +26,7 @@ import android.opengl.GLES20;
|
||||||
|
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Halo;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Halo;
|
||||||
|
@ -72,6 +73,10 @@ public class WandmakerSprite extends MobSprite {
|
||||||
shield.putOut();
|
shield.putOut();
|
||||||
}
|
}
|
||||||
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
|
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
|
||||||
|
|
||||||
|
if (visible) {
|
||||||
|
Sample.INSTANCE.play( Assets.SND_BURNING );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Shield extends Halo {
|
public class Shield extends Halo {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user