v0.7.5: improved visuals on Goo's level

This commit is contained in:
Evan Debenham 2019-09-10 21:33:01 -04:00
parent 331c05420d
commit 6ec6aadafc
6 changed files with 88 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.SewerBoss
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.SewerBossExitRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.SewerBossExitRoom;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.Group;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@ -157,6 +158,14 @@ public class SewerBossLevel extends SewerLevel {
} }
} }
@Override
public Group addVisuals() {
super.addVisuals();
if (map[exit-1] != Terrain.WALL_DECO) visuals.add(new PrisonLevel.Torch(exit-1));
if (map[exit+1] != Terrain.WALL_DECO) visuals.add(new PrisonLevel.Torch(exit+1));
return visuals;
}
private static final String STAIRS = "stairs"; private static final String STAIRS = "stairs";
@Override @Override

View File

@ -58,7 +58,7 @@ public class DiamondGooRoom extends GooBossRoom {
Painter.set(level, curr, Terrain.EMPTY_SP); Painter.set(level, curr, Terrain.EMPTY_SP);
curr.x += dir.x; curr.x += dir.x;
curr.y += dir.y; curr.y += dir.y;
} while (level.map[level.pointToCell(curr)] != Terrain.EMPTY); } while (level.map[level.pointToCell(curr)] == Terrain.WALL);
} }
Painter.fill( level, left + width()/2 - 1, top + height()/2 - 2, 2 + width()%2, 4 + height()%2, Terrain.WATER); Painter.fill( level, left + width()/2 - 1, top + height()/2 - 2, 2 + width()%2, 4 + height()%2, Terrain.WATER);

View File

@ -35,6 +35,11 @@ public class SewerBossEntranceRoom extends EntranceRoom {
return 6; return 6;
} }
@Override
public int minWidth() {
return 8;
}
public void paint(Level level ) { public void paint(Level level ) {
Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, Terrain.WALL );

View File

@ -21,23 +21,27 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss; package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.ExitRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.ExitRoom;
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
import com.watabou.noosa.Image;
import com.watabou.noosa.Tilemap;
import com.watabou.utils.Point; import com.watabou.utils.Point;
public class SewerBossExitRoom extends ExitRoom { public class SewerBossExitRoom extends ExitRoom {
@Override @Override
public int minWidth() { public int minWidth() {
return Math.max(super.minWidth(), 7); return Math.max(super.minWidth(), 8);
} }
@Override @Override
public int minHeight() { public int minHeight() {
return Math.max(super.minHeight(), 7); return Math.max(super.minHeight(), 8);
} }
public void paint(Level level) { public void paint(Level level) {
@ -51,13 +55,77 @@ public class SewerBossExitRoom extends ExitRoom {
Point c = center(); Point c = center();
Painter.fill( level, c.x-1, c.y-1, 3, 1, Terrain.WALL ); Painter.fill( level, c.x-1, c.y-1, 3, 2, Terrain.WALL );
Painter.fill( level, c.x-1, c.y , 3, 1, Terrain.WALL_DECO ); Painter.fill( level, c.x-1, c.y+1, 3, 1, Terrain.EMPTY_SP );
Painter.fill( level, c.x-1, c.y+1, 3, 1, Terrain.WATER );
level.exit = level.pointToCell(c); level.exit = level.pointToCell(c);
Painter.set( level, level.exit, Terrain.LOCKED_EXIT ); Painter.set( level, level.exit, Terrain.LOCKED_EXIT );
} CustomTilemap vis = new SewerExit();
vis.pos(c.x-1, c.y);
level.customTiles.add(vis);
vis = new SewerExitOverhang();
vis.pos(c.x-1, c.y-2);
level.customWalls.add(vis);
} }
public static class SewerExit extends CustomTilemap {
{
texture = Assets.SEWER_BOSS;
tileW = 3;
tileH = 3;
}
private static final int[] layout = new int[]{
21, -1, 22,
23, 23, 23,
24, 24, 24
};
@Override
public Tilemap create() {
Tilemap v = super.create();
v.map(layout, 3);
return v;
}
@Override
public Image image(int tileX, int tileY) {
if ((tileX == 1 && tileY == 0) || tileY == 2){
return null;
}
return super.image(tileX, tileY);
}
}
public static class SewerExitOverhang extends CustomTilemap {
{
texture = Assets.SEWER_BOSS;
tileW = 3;
tileH = 2;
}
private static final int[] layout = new int[]{
16, 17, 18,
19, -1, 20
};
@Override
public Tilemap create() {
Tilemap v = super.create();
v.map(layout, 3);
return v;
}
@Override
public Image image(int tileX, int tileY) {
return null;
}
}
}