Damage character #11
@@ -141,6 +141,7 @@ public class MainGame extends ApplicationAdapter {
|
|||||||
music.setVolume(.1f);
|
music.setVolume(.1f);
|
||||||
music.play();
|
music.play();
|
||||||
music.setLooping(true);
|
music.setLooping(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ public class GameInputProcessor implements InputProcessor {
|
|||||||
}
|
}
|
||||||
// clicking on enemy
|
// clicking on enemy
|
||||||
if (mainGame.hasCharacterSelected() && gameTile.containsCharacter() && gameTile.getCharacter().getFaction() != mainGame.getChosenFaction()) {
|
if (mainGame.hasCharacterSelected() && gameTile.containsCharacter() && gameTile.getCharacter().getFaction() != mainGame.getChosenFaction()) {
|
||||||
|
if (mainGame.mapRenderer.getSurroundedTilesOfCurrentCharacter().contains(gameTile))
|
||||||
gameTile.getCharacter().damage(10);
|
gameTile.getCharacter().damage(10);
|
||||||
}
|
}
|
||||||
// set selected character
|
// set selected character
|
||||||
|
|||||||
Reference in New Issue
Block a user