door colors on maps

This commit is contained in:
Tim
2021-07-01 10:23:46 +02:00
parent e818037d75
commit af51d3776e
9 changed files with 11 additions and 9 deletions

View File

@@ -28,8 +28,10 @@ public class DoorTile extends Tile implements Ticker {
float dist = player.dist(posX + 0.5f, posY + 0.5f); float dist = player.dist(posX + 0.5f, posY + 0.5f);
if (dist < 0.5f) { if (dist < 0.5f) {
if (!waitForLeave) { if (!waitForLeave) {
if (connected != null) {
Main.instance.getWorld().changeMap(this); Main.instance.getWorld().changeMap(this);
} }
}
} else { } else {
waitForLeave = false; waitForLeave = false;
} }

View File

@@ -52,7 +52,7 @@ public class ImageMap extends Map {
} }
if (id == Tile.DOOR_RIGHT ) { if (id == Tile.DOOR_RIGHT ) {
DoorTile door = new DoorTile(id, x, y, this); DoorTile door = new DoorTile(id, x, y, this);
leftDoor = door; rightDoor = door;
door.setSide(DoorTile.RIGHT); door.setSide(DoorTile.RIGHT);
tiles[x][y] = door; tiles[x][y] = door;
add(tiles[x][y]); add(tiles[x][y]);
@@ -60,7 +60,7 @@ public class ImageMap extends Map {
} }
if (id == Tile.DOOR_TOP) { if (id == Tile.DOOR_TOP) {
DoorTile door = new DoorTile(id, x, y, this); DoorTile door = new DoorTile(id, x, y, this);
leftDoor = door; topDoor = door;
door.setSide(DoorTile.TOP); door.setSide(DoorTile.TOP);
tiles[x][y] = door; tiles[x][y] = door;
add(tiles[x][y]); add(tiles[x][y]);
@@ -68,7 +68,7 @@ public class ImageMap extends Map {
} }
if (id == Tile.DOOR_BOTTOM) { if (id == Tile.DOOR_BOTTOM) {
DoorTile door = new DoorTile(id, x, y, this); DoorTile door = new DoorTile(id, x, y, this);
leftDoor = door; bottomDoor = door;
door.setSide(DoorTile.BOTTOM); door.setSide(DoorTile.BOTTOM);
tiles[x][y] = door; tiles[x][y] = door;
add(tiles[x][y]); add(tiles[x][y]);

View File

@@ -10,7 +10,7 @@ public class TestWorld extends World {
super(4); super(4);
Map m2 = maps[3].clone(); Map m2 = maps[3].clone();
getCurrentMap().connectDoors(getCurrentMap().leftDoor, m2.leftDoor); getCurrentMap().connectDoors(getCurrentMap().bottomDoor, m2.topDoor);
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
Coin c = new Coin(); Coin c = new Coin();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 163 B