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