v0.8.1: checked cell vfx now appear ontop of terrain and fog of war

This commit is contained in:
Evan Debenham 2020-06-10 15:41:44 -04:00
parent 9fe214de3a
commit b0205da8be
3 changed files with 10 additions and 2 deletions

View File

@ -1719,7 +1719,7 @@ public class Hero extends Char {
if (fieldOfView[p] && p != pos) {
if (intentional) {
sprite.parent.addToBack(new CheckedCell(p, pos));
GameScene.effectOverFog(new CheckedCell(p, pos));
}
if (Dungeon.level.secret[p]){

View File

@ -62,7 +62,7 @@ public class StoneOfClairvoyance extends Runestone {
left = Math.max(0, left);
for (curr = left + y * Dungeon.level.width(); curr <= right + y * Dungeon.level.width(); curr++){
curUser.sprite.parent.addToBack( new CheckedCell( curr, cell ) );
GameScene.effectOverFog( new CheckedCell( curr, cell ) );
Dungeon.level.mapped[curr] = true;
if (Dungeon.level.secret[curr]) {

View File

@ -155,6 +155,7 @@ public class GameScene extends PixelScene {
private Group spells;
private Group statuses;
private Group emoicons;
private Group overFogEffects;
private Group healthIndicators;
private Toolbar toolbar;
@ -243,6 +244,7 @@ public class GameScene extends PixelScene {
effects = new Group();
healthIndicators = new Group();
emoicons = new Group();
overFogEffects = new Group();
mobs = new Group();
add( mobs );
@ -292,6 +294,8 @@ public class GameScene extends PixelScene {
spells = new Group();
add( spells );
add(overFogEffects);
statuses = new Group();
add( statuses );
@ -809,6 +813,10 @@ public class GameScene extends PixelScene {
public static void effect( Visual effect ) {
scene.effects.add( effect );
}
public static void effectOverFog( Visual effect ) {
scene.overFogEffects.add( effect );
}
public static Ripple ripple( int pos ) {
if (scene != null) {