diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java index a408459..fada1dc 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java @@ -30,18 +30,16 @@ import com.jme3.system.AppSettings; import com.simsilica.lemur.GuiGlobals; import com.simsilica.lemur.style.BaseStyles; -import pp.dialog.Dialog; import pp.dialog.DialogBuilder; import pp.dialog.DialogManager; import pp.graphics.Draw; import static pp.monopoly.Resources.lookup; import pp.monopoly.client.gui.SettingsMenu; import pp.monopoly.client.gui.StartMenu; -import pp.monopoly.client.gui.TestWorld; -import pp.monopoly.client.gui.popups.*; import pp.monopoly.game.client.ClientGameLogic; import pp.monopoly.game.client.MonopolyClient; import pp.monopoly.game.client.ServerConnection; +import pp.monopoly.message.client.NotificationAnswer; import pp.monopoly.notification.ClientStateEvent; import pp.monopoly.notification.GameEventListener; import pp.monopoly.notification.InfoTextEvent; @@ -123,22 +121,10 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga */ private final ActionListener escapeListener = (name, isPressed, tpf) -> escape(isPressed); - //TODO temp for testing - private EventCardPopup eventCard; - private BuildingPropertyCard buildingProperty; - private FoodFieldCard foodField; - private GateFieldCard gateField; - private LooserPopUp looserpopup; - private Bankrupt bankrupt; - private TimeOut timeOut; - private SellHouse sellHouse; - private BuyHouse buyHouse; - private TakeMortage takeMortage; - private RepayMortage repayMortage; - - private boolean isBuyCardPopupOpen = false; - private final ActionListener BListener = (name, isPressed, tpf) -> handleB(isPressed); - private TestWorld testWorld; + /** + * Listener for handeling Demo Mode (Minas mode) + */ + private final ActionListener f8Listener = (name, isPressed, tpf) -> handleF8(isPressed); static { // Configure logging @@ -267,20 +253,20 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga inputManager.setCursorVisible(false); inputManager.addMapping(ESC, new KeyTrigger(KeyInput.KEY_ESCAPE)); inputManager.addMapping(CLICK, new MouseButtonTrigger(MouseInput.BUTTON_LEFT)); + inputManager.addMapping("F8", new KeyTrigger(KeyInput.KEY_F8)); + inputManager.addListener(f8Listener, "F8"); inputManager.addListener(escapeListener, ESC); - - //TODO tmp for testing - // inputManager.addMapping("B", new KeyTrigger(KeyInput.KEY_B)); - // inputManager.addListener(BListener, "B"); - // inputManager.addMapping("T", new KeyTrigger(KeyInput.KEY_T)); } - //logik zum wechselnden erscheinen und verschwinden beim drücken von B //TODO später entfernen - private void handleB(boolean isPressed) { + /** + * Handles the action on alt m for demo mode + * @param isPressed {@code true} is alt + m is pressed, {@code false} otherwise + */ + private void handleF8(boolean isPressed) { if (isPressed) { - Dialog tmp = new GulagInfo(this, 3); - tmp.open(); + LOGGER.log(Level.INFO, "F detected."); // Debug logging + getGameLogic().send(new NotificationAnswer("hack")); } } @@ -333,11 +319,6 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga dialogManager.update(tpf); logic.update(tpf); stateManager.update(tpf); - - // //TODO testing replace later - // if (testWorld != null) { - // testWorld.update(tpf); - // } } /**