v0.4.2b: removed blood associated with the heroes
This commit is contained in:
parent
5da611f452
commit
ae6d4ad842
|
@ -54,7 +54,7 @@ public class ColorMath {
|
|||
} else if (p >= 1) {
|
||||
return colors[colors.length-1];
|
||||
}
|
||||
int segment = (int)(colors.length * p);
|
||||
int segment = (int)((colors.length-1) * p);
|
||||
return interpolate( colors[segment], colors[segment+1], (p * (colors.length - 1)) % 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import com.watabou.noosa.Camera;
|
|||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.PointF;
|
||||
|
||||
public class HeroSprite extends CharSprite {
|
||||
|
||||
|
@ -118,6 +119,18 @@ public class HeroSprite extends CharSprite {
|
|||
play( read );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bloodBurstA(PointF from, int damage) {
|
||||
//Does nothing.
|
||||
|
||||
/*
|
||||
* This is both for visual clarity, and also for content ratings regarding violence
|
||||
* towards human characters. The heroes are the only human or human-like characters which
|
||||
* participate in combat, so removing all blood associated with them is a simple way to
|
||||
* reduce the violence rating of the game.
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
sleeping = ch.isAlive() && ((Hero)ch).resting;
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndJournal;
|
|||
import com.watabou.input.Touchscreen.Touch;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.TouchArea;
|
||||
|
@ -42,12 +43,13 @@ import com.watabou.noosa.particles.BitmaskEmitter;
|
|||
import com.watabou.noosa.particles.Emitter;
|
||||
import com.watabou.noosa.ui.Button;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.ColorMath;
|
||||
|
||||
public class StatusPane extends Component {
|
||||
|
||||
private NinePatch bg;
|
||||
private Image avatar;
|
||||
private Emitter blood;
|
||||
private float warning;
|
||||
|
||||
private int lastTier = 0;
|
||||
|
||||
|
@ -98,13 +100,6 @@ public class StatusPane extends Component {
|
|||
avatar = HeroSprite.avatar( Dungeon.hero.heroClass, lastTier );
|
||||
add( avatar );
|
||||
|
||||
blood = new BitmaskEmitter( avatar );
|
||||
|
||||
blood.pour( BloodParticle.FACTORY, 0.3f );
|
||||
blood.autoKill = false;
|
||||
blood.on = false;
|
||||
add( blood );
|
||||
|
||||
compass = new Compass( Dungeon.level.exit );
|
||||
add( compass );
|
||||
|
||||
|
@ -184,14 +179,13 @@ public class StatusPane extends Component {
|
|||
float max = Dungeon.hero.HT;
|
||||
|
||||
if (!Dungeon.hero.isAlive()) {
|
||||
avatar.tint( 0x000000, 0.6f );
|
||||
blood.on = false;
|
||||
} else if ((health/max) < 0.25f) {
|
||||
avatar.tint( 0xcc0000, 0.4f );
|
||||
blood.on = true;
|
||||
avatar.tint(0x000000, 0.5f);
|
||||
} else if ((health/max) < 0.3f) {
|
||||
warning += Game.elapsed * 5f *(0.4f - (health/max));
|
||||
warning %= 1f;
|
||||
avatar.tint(ColorMath.interpolate(warning, 0x660000, 0xCC0000, 0x660000), 0.5f );
|
||||
} else {
|
||||
avatar.resetColor();
|
||||
blood.on = false;
|
||||
}
|
||||
|
||||
hp.scale.x = Math.max( 0, (health-shield)/max);
|
||||
|
|
Loading…
Reference in New Issue
Block a user