made them bois killable
This commit is contained in:
BIN
core/assets/dead.png
Normal file
BIN
core/assets/dead.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
core/assets/grave.png
Normal file
BIN
core/assets/grave.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -27,7 +27,7 @@ public class MapRenderer implements Renderable {
|
||||
private Texture square;
|
||||
private Texture square2;
|
||||
private Texture hitMarker;
|
||||
|
||||
private Texture tombStone;
|
||||
|
||||
public static TextureRegion FLOOR_TILE;
|
||||
public static TextureRegion WALL_TILE;
|
||||
@@ -63,10 +63,12 @@ public class MapRenderer implements Renderable {
|
||||
mainGame.assets.load("square2.png", Texture.class);
|
||||
mainGame.assets.load(tilePath, Texture.class);
|
||||
mainGame.assets.load("hit.png",Texture.class);
|
||||
mainGame.assets.load("dead.png",Texture.class);
|
||||
mainGame.assets.finishLoading();
|
||||
square = mainGame.assets.get("square.png");
|
||||
square2 = mainGame.assets.get("square2.png");
|
||||
hitMarker = mainGame.assets.get("hit.png");
|
||||
tombStone = mainGame.assets.get("dead.png");
|
||||
|
||||
Texture texture = mainGame.assets.get(tilePath);
|
||||
TextureRegion[][] tileTextures = TextureRegion.split(texture, 32, 32);
|
||||
@@ -121,16 +123,21 @@ public class MapRenderer implements Renderable {
|
||||
|
||||
if (cur.containsCharacter()) {
|
||||
GameCharacter character = cur.getCharacter();
|
||||
batch.draw(character.getTextureRegion(), cur.x, cur.y);
|
||||
if (!character.isDead()) {
|
||||
batch.draw(character.getTextureRegion(), cur.x, cur.y);
|
||||
// System.out.println("character " + character.getName() + " showing: " + character.isShowingAnimation());
|
||||
if (character.isShowingAnimation()) {
|
||||
if (character.isShowingAnimation()) {
|
||||
// System.out.println("animation");
|
||||
batch.draw(hitMarker,cur.x,cur.y);
|
||||
}
|
||||
batch.draw(hitMarker, cur.x, cur.y);
|
||||
}
|
||||
|
||||
|
||||
if (cur.getCharacter().equals(mainGame.getSelectedCharacter())) {
|
||||
batch.draw(square, cur.x, cur.y);
|
||||
if (cur.getCharacter().equals(mainGame.getSelectedCharacter())) {
|
||||
batch.draw(square, cur.x, cur.y);
|
||||
}
|
||||
|
||||
} else {
|
||||
batch.draw(tombStone,cur.x,cur.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user