fix
This commit is contained in:
@@ -122,7 +122,7 @@ public class MainGame extends Game implements ClientCallback {
|
|||||||
camera.update();
|
camera.update();
|
||||||
setGamestate(GAMESTATE.SELECTING_FACTION);
|
setGamestate(GAMESTATE.SELECTING_FACTION);
|
||||||
connectToServer();
|
connectToServer();
|
||||||
playSong();
|
// playSong();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public class GameInputProcessor implements InputProcessor {
|
|||||||
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)) {
|
if (mainGame.mapRenderer.getSurroundedTilesOfCurrentCharacter().contains(gameTile)) {
|
||||||
if (!gameTile.getCharacter().isDead()) {
|
if (!gameTile.getCharacter().isDead()) {
|
||||||
gameTile.getCharacter().damage(100);
|
gameTile.getCharacter().damage(gameTile.getCharacter().getDamageAmount());
|
||||||
mainGame.increaseTurn();
|
mainGame.increaseTurn();
|
||||||
mainGame.send(new DamageData(gameTile.getCharacter().getName()));
|
mainGame.send(new DamageData(gameTile.getCharacter().getName()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public class GameTile extends Rectangle {
|
|||||||
super.height = textureRegion.getRegionHeight();
|
super.height = textureRegion.getRegionHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public GameCharacter getCharacter() {
|
public GameCharacter getCharacter() {
|
||||||
return character;
|
return character;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ public abstract class GameCharacter extends Actor implements Comparable<GameChar
|
|||||||
this.health += amount;
|
this.health += amount;
|
||||||
if (this.health > 100) this.health = 10;
|
if (this.health > 100) this.health = 10;
|
||||||
}
|
}
|
||||||
|
public int getDamageAmount() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
public void damage(int amount) {
|
public void damage(int amount) {
|
||||||
this.health -= amount;
|
this.health -= amount;
|
||||||
|
|||||||
Reference in New Issue
Block a user