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 boolean renderShadow = false;
|
||||||
protected float shadowWidth = 1.2f;
|
protected float shadowWidth = 1.2f;
|
||||||
protected float shadowHeight = 0.25f;
|
protected float shadowHeight = 0.25f;
|
||||||
protected float shadowOffset = 0.5f;
|
protected float shadowOffset = 0.25f;
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED
|
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(
|
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()) + 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;
|
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
|
||||||
|
@ -28,6 +29,9 @@ public class PiranhaSprite extends MobSprite {
|
||||||
|
|
||||||
public PiranhaSprite() {
|
public PiranhaSprite() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
renderShadow = false;
|
||||||
|
perspectiveRaise = 0.2f;
|
||||||
|
|
||||||
texture( Assets.PIRANHA );
|
texture( Assets.PIRANHA );
|
||||||
|
|
||||||
|
@ -47,7 +51,13 @@ public class PiranhaSprite extends MobSprite {
|
||||||
|
|
||||||
play( idle );
|
play( idle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void link(Char ch) {
|
||||||
|
super.link(ch);
|
||||||
|
renderShadow = false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete( Animation anim ) {
|
public void onComplete( Animation anim ) {
|
||||||
super.onComplete( anim );
|
super.onComplete( anim );
|
||||||
|
|
|
@ -34,6 +34,8 @@ public class RotHeartSprite extends MobSprite {
|
||||||
public RotHeartSprite(){
|
public RotHeartSprite(){
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
perspectiveRaise = 0.2f;
|
||||||
|
|
||||||
texture( Assets.ROT_HEART );
|
texture( Assets.ROT_HEART );
|
||||||
|
|
||||||
TextureFilm frames = new TextureFilm( texture, 16, 16 );
|
TextureFilm frames = new TextureFilm( texture, 16, 16 );
|
||||||
|
@ -57,6 +59,8 @@ public class RotHeartSprite extends MobSprite {
|
||||||
public void link( Char ch ) {
|
public void link( Char ch ) {
|
||||||
super.link( ch );
|
super.link( ch );
|
||||||
|
|
||||||
|
renderShadow = false;
|
||||||
|
|
||||||
if (cloud == null) {
|
if (cloud == null) {
|
||||||
cloud = emitter();
|
cloud = emitter();
|
||||||
cloud.pour( Speck.factory(Speck.TOXIC), 0.7f );
|
cloud.pour( Speck.factory(Speck.TOXIC), 0.7f );
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
|
||||||
|
@ -28,7 +29,9 @@ public class YogSprite extends MobSprite {
|
||||||
|
|
||||||
public YogSprite() {
|
public YogSprite() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
perspectiveRaise = 0.2f;
|
||||||
|
|
||||||
texture( Assets.YOG );
|
texture( Assets.YOG );
|
||||||
|
|
||||||
TextureFilm frames = new TextureFilm( texture, 20, 19 );
|
TextureFilm frames = new TextureFilm( texture, 20, 19 );
|
||||||
|
@ -47,7 +50,13 @@ public class YogSprite extends MobSprite {
|
||||||
|
|
||||||
play( idle );
|
play( idle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void link(Char ch) {
|
||||||
|
super.link(ch);
|
||||||
|
renderShadow = false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void die() {
|
public void die() {
|
||||||
super.die();
|
super.die();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user