v0.5.0: corrected shadows in some specific cases
This commit is contained in:
parent
4d1446b229
commit
2b314bf1a9
|
@ -74,7 +74,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
protected boolean renderShadow = false;
|
||||
protected float shadowWidth = 1.2f;
|
||||
protected float shadowHeight = 0.25f;
|
||||
protected float shadowOffset = 0.5f;
|
||||
protected float shadowOffset = 0.25f;
|
||||
|
||||
public enum State {
|
||||
BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED
|
||||
|
@ -137,7 +137,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
|
||||
return new PointF(
|
||||
PixelScene.align(Camera.main, ((cell % Dungeon.level.width()) + 0.5f) * csize - width * 0.5f),
|
||||
PixelScene.align(Camera.main, ((cell / Dungeon.level.width()) + 1.0f) * csize - height - csize * 0.33f)
|
||||
PixelScene.align(Camera.main, ((cell / Dungeon.level.width()) + 1.0f) * csize - height - csize * perspectiveRaise)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
|
||||
|
@ -29,6 +30,9 @@ public class PiranhaSprite extends MobSprite {
|
|||
public PiranhaSprite() {
|
||||
super();
|
||||
|
||||
renderShadow = false;
|
||||
perspectiveRaise = 0.2f;
|
||||
|
||||
texture( Assets.PIRANHA );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 12, 16 );
|
||||
|
@ -48,6 +52,12 @@ public class PiranhaSprite extends MobSprite {
|
|||
play( idle );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void link(Char ch) {
|
||||
super.link(ch);
|
||||
renderShadow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete( Animation anim ) {
|
||||
super.onComplete( anim );
|
||||
|
|
|
@ -34,6 +34,8 @@ public class RotHeartSprite extends MobSprite {
|
|||
public RotHeartSprite(){
|
||||
super();
|
||||
|
||||
perspectiveRaise = 0.2f;
|
||||
|
||||
texture( Assets.ROT_HEART );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 16, 16 );
|
||||
|
@ -57,6 +59,8 @@ public class RotHeartSprite extends MobSprite {
|
|||
public void link( Char ch ) {
|
||||
super.link( ch );
|
||||
|
||||
renderShadow = false;
|
||||
|
||||
if (cloud == null) {
|
||||
cloud = emitter();
|
||||
cloud.pour( Speck.factory(Speck.TOXIC), 0.7f );
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
|
||||
|
@ -29,6 +30,8 @@ public class YogSprite extends MobSprite {
|
|||
public YogSprite() {
|
||||
super();
|
||||
|
||||
perspectiveRaise = 0.2f;
|
||||
|
||||
texture( Assets.YOG );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 20, 19 );
|
||||
|
@ -48,6 +51,12 @@ public class YogSprite extends MobSprite {
|
|||
play( idle );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void link(Char ch) {
|
||||
super.link(ch);
|
||||
renderShadow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die() {
|
||||
super.die();
|
||||
|
|
Loading…
Reference in New Issue
Block a user