From df26e329490b556f0d8512b888b4f570978cd3fc Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 9 Jan 2020 15:00:20 -0500 Subject: [PATCH] v0.8.0: added a WIP sprite for DM-100s --- core/src/main/assets/dm100.png | Bin 0 -> 2278 bytes .../shatteredpixeldungeon/Assets.java | 1 + .../sprites/DM100Sprite.java | 38 +++++++++++------- 3 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 core/src/main/assets/dm100.png diff --git a/core/src/main/assets/dm100.png b/core/src/main/assets/dm100.png new file mode 100644 index 0000000000000000000000000000000000000000..4f7b02b089cbeb0f49b448fd403ab53698fd00f3 GIT binary patch literal 2278 zcmVEX>4Tx04R}tkv&MmP!xqv(~3o^4i*t{$WWauh>AE$6^me@v=v%)FnQ@8G-*gu zTpR`0f`dPcRR>vukay=0QxW}F;h>Z7c=mzuY2mIx{LBG@4i2)SIL_U@QK88OgAjz4dR(i zOXs{#9A+g+AwDM_H|T=Ik6f2se&bwpSm2pqBa@mZ4ik&T4wgHZl?;`5nmD4U8s!UF zmle)ioYhK=weHDZ7|LraX|B^6K^#j+APEsNYAB-u3sKrNQcR@iJm%pacKk_l$>b`7 zkz)Z>sE`~#_#gb9ty!3wbdy3cpzFo9KSqJ>U7%UF?eAmTZk_=CXW&X}`>PFL_LKB_ zTZy{D4^000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2jl?=77GrgGTCJS00!boL_t(|+U;9CXd_1yelI?7 zb8w9j$gpsY-CY`2VGCoC>wIZK%oYJvC+EObKwKJg!rLSmQXQPNssvXIF{9vj5P~$dUY-5>g7VVRYd;U}7YOshfZ}T>bhBrk_Q_>eDvrNL^JWPDo?;mH5 zrT(Lnia&{nL`@raFnEu7Tfry}U;AwFmKJ>3UTtW!G{WUr4zkj)TG4Z_Xd(&ua z&sq2x+k>K{%&S@kViFU}wl`8qpNEl~4lhIx001hLrOdu{---l&lDM*n6phQ|56(ld zmaAYbR||^`(e71?j=Cyz|+RF?F}+H9EJR(;EcHn|=ojFVt6I6>Q9Gr54&XQsYN*QRKBp^aOsJtM7UTmTvjPSE*bQ+q!p@+WYf z*Crv3&?Hh!egGiPYbVC?-(TMm7~*Bl-z6C1MSZ&#H^au5EEfD)J%`DkB^(7d+{!IE zCMgV>e%{p$!3W97I3iA1l^je2z4~9Ry$!^q5}3?38jTgzA5*2WR4551=qm+52#&Lf zLL5O5oKdB+loXHPj4bOhI?g7@f)xZISXMPPb|rDiw%1~z>vX)rICV^&jz>DHD&u6K zQbk7`n&(}JBcmIW#0Y}(Fs|x~P{mD0DpfdUx#TEI+^nh}1mT?$0puzWB@hk!)z8+rnDynHJaY z|CxyQ{CNXe01DvbSh2_r1}6vrTAXdKA;)4Dz!urEssNYz-$&HzPAq6DS)zTI7-ub4 zW8tXR9Rx7{K7gN6$iYqu+m7~9@3I*&?a2`(-^#g3&?S%O+^ z9fasnw=1AlTQ^= zM8-{M@h}L&&$<(Uv7JQue9@! zA<`TRBkN1@?s)VIOc)H_qkOOn;CW+=jNSkJHTL_*ARo2bI;t3cEpN=pOAhZ%8@g{r zY|V>2x|_x0J=bl;F>kd1%;F;Inw+ba?+u3hFsb-_$kjg& zFZWZ$sPG5G!veSc`W4`>oNx%y|VN!k9#tR+&(kE79eX8$3`+9cDF zL|!&z35O89SU7ZqR>e3t4`cTrf2WeN(b!HEky(nstrh@Ibk}Xgda zqm*inWs>eDaNJJ?A19@J=m;T`k;$JW9CC$~ai^yrQLW&NBO AtpET3 literal 0 HcmV?d00001 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 07f5928b9..5e4a8e910 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -105,6 +105,7 @@ public class Assets { public static final String GHOUL = "ghoul.png"; public static final String RIPPER = "ripper.png"; public static final String SPAWNER = "spawner.png"; + public static final String DM100 = "dm100.png"; public static final String ITEMS = "items.png"; public static final String TERRAIN_FEATURES = "terrain_features.png"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM100Sprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM100Sprite.java index f71b132c6..75ea3aa47 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM100Sprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM100Sprite.java @@ -26,35 +26,36 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning; +import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.watabou.noosa.TextureFilm; import com.watabou.noosa.audio.Sample; -//TODO currently just uses DM-300's sprite scaled to 60% +//TODO sprite still needs work public class DM100Sprite extends MobSprite { public DM100Sprite () { super(); - texture( Assets.DM300 ); + texture( Assets.DM100 ); - TextureFilm frames = new TextureFilm( texture, 22, 20 ); + TextureFilm frames = new TextureFilm( texture, 14, 14 ); - idle = new Animation( 10, true ); + idle = new Animation( 1, true ); idle.frames( frames, 0, 1 ); + + run = new Animation( 12, true ); + run.frames( frames, 6, 7, 8, 9 ); - run = new Animation( 10, true ); - run.frames( frames, 2, 3 ); - - attack = new Animation( 15, false ); - attack.frames( frames, 4, 5, 6, 0 ); - - zap = attack.clone(); - - die = new Animation( 20, false ); - die.frames( frames, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 8 ); + attack = new Animation( 12, false ); + attack.frames( frames, 2, 3, 4, 0 ); + + zap = new Animation( 8, false ); + zap.frames( frames, 5, 5, 1 ); + + die = new Animation( 8, false ); + die.frames( frames, 10, 11, 12 ); play( idle ); - scale.set( 0.6f ); } public void zap( int pos ) { @@ -69,9 +70,16 @@ public class DM100Sprite extends MobSprite { Sample.INSTANCE.play( Assets.SND_LIGHTNING ); turnTo( ch.pos, pos ); + flash(); play( zap ); } + @Override + public void die() { + emitter().burst( Speck.factory( Speck.WOOL ), 5 ); + super.die(); + } + @Override public void onComplete( Animation anim ) { if (anim == zap) {