v0.7.5: improved snake sprite
This commit is contained in:
parent
ba65051e18
commit
f5d88c333e
Binary file not shown.
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 390 B |
|
@ -24,7 +24,6 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
|
||||||
//TODO placeholder graphics atm
|
|
||||||
public class SnakeSprite extends MobSprite {
|
public class SnakeSprite extends MobSprite {
|
||||||
|
|
||||||
public SnakeSprite() {
|
public SnakeSprite() {
|
||||||
|
@ -32,19 +31,21 @@ public class SnakeSprite extends MobSprite {
|
||||||
|
|
||||||
texture( Assets.SNAKE );
|
texture( Assets.SNAKE );
|
||||||
|
|
||||||
TextureFilm frames = new TextureFilm( texture, 12, 12 );
|
TextureFilm frames = new TextureFilm( texture, 12, 11 );
|
||||||
|
|
||||||
|
//many frames here as we want the rising/falling to be slow but the tongue to be fast
|
||||||
idle = new Animation( 10, true );
|
idle = new Animation( 10, true );
|
||||||
idle.frames( frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1 );
|
idle.frames( frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1);
|
||||||
|
|
||||||
run = new Animation( 10, true );
|
run = new Animation( 8, true );
|
||||||
run.frames( frames, 3, 4 );
|
run.frames( frames, 4, 5, 6, 7 );
|
||||||
|
|
||||||
attack = new Animation( 15, false );
|
attack = new Animation( 15, false );
|
||||||
attack.frames( frames, 5, 6, 7, 7, 0 );
|
attack.frames( frames, 8, 9, 10, 9, 0);
|
||||||
|
|
||||||
die = new Animation( 10, false );
|
die = new Animation( 10, false );
|
||||||
die.frames( frames, 8, 9, 10 );
|
die.frames( frames, 11, 12, 13 );
|
||||||
|
|
||||||
play(idle);
|
play(idle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user