fix faction choosing
This commit is contained in:
@@ -205,7 +205,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
if (this.ready && this.enemyReady) {
|
||||
if (this.chosenFaction == Faction.HACKER) {
|
||||
chooseHacker();
|
||||
} else {
|
||||
} else if (this.chosenFaction == Faction.MEGACORPORATION){
|
||||
chooseMegaCorp();
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
}
|
||||
|
||||
private void renderText() {
|
||||
String text = "FACION: " + chosenFaction;
|
||||
String text = "FACTION: " + chosenFaction;
|
||||
text += "\nSelected character: " + selectedCharacter.getName();
|
||||
text += "\nHealth: " + selectedCharacter.getHealth();
|
||||
layout.setText(font, text);
|
||||
|
||||
@@ -119,10 +119,14 @@ public class GameInputProcessor implements InputProcessor {
|
||||
}
|
||||
} else if (mainGame.getGamestate() == GAMESTATE.SELECTING_FACTION) {
|
||||
if (keycode == Input.Keys.NUM_1) {
|
||||
System.out.println("choosing mega");
|
||||
mainGame.send(new TeamData(Faction.MEGACORPORATION,mainGame.getUsername()));
|
||||
mainGame.chooseMegaCorp();
|
||||
}
|
||||
if (keycode == Input.Keys.NUM_2) {
|
||||
System.out.println("choosing hacker");
|
||||
mainGame.send(new TeamData(Faction.HACKER,mainGame.getUsername()));
|
||||
mainGame.chooseHacker();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user