v0.7.5: improved snake sprite

This commit is contained in:
Evan Debenham 2019-09-30 22:04:10 -04:00
parent ba65051e18
commit f5d88c333e
2 changed files with 8 additions and 7 deletions
android/src/main/assets
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites

Binary file not shown.

Before

(image error) Size: 282 B

After

(image error) Size: 390 B

View File

@ -24,7 +24,6 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.watabou.noosa.TextureFilm;
//TODO placeholder graphics atm
public class SnakeSprite extends MobSprite {
public SnakeSprite() {
@ -32,19 +31,21 @@ public class SnakeSprite extends MobSprite {
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.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.frames( frames, 3, 4 );
run = new Animation( 8, true );
run.frames( frames, 4, 5, 6, 7 );
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.frames( frames, 8, 9, 10 );
die.frames( frames, 11, 12, 13 );
play(idle);
}