merge dev into test #33

Merged
j23f0712 merged 36 commits from development into dev/test 2024-12-02 17:37:00 +01:00
54 changed files with 1278 additions and 394 deletions
Showing only changes of commit 208261c6bf - Show all commits

View File

@@ -17,6 +17,7 @@
import pp.mdga.client.board.OutlineControl;
import pp.mdga.client.board.PieceControl;
import pp.mdga.client.gui.CardControl;
import pp.mdga.client.gui.DiceControl;
import pp.mdga.client.view.GameView;
import pp.mdga.game.BonusCard;
import pp.mdga.game.Color;
@@ -93,10 +94,15 @@ public void onAction(String name, boolean isPressed, float tpf) {
}
if(name.equals("Click") && isPressed) {
if (app.getView() instanceof GameView gameView) {
DiceControl diceSelect = checkHover(gameView.getGuiHandler().getCardLayerCamera(), gameView.getGuiHandler().getCardLayerRootNode(), DiceControl.class);
CardControl cardLayerSelect = checkHover(gameView.getGuiHandler().getCardLayerCamera(), gameView.getGuiHandler().getCardLayerRootNode(), CardControl.class);
OutlineControl boardSelect = checkHover(app.getCamera(), app.getRootNode(), OutlineControl.class);
if(cardLayerSelect != null) {
if(diceSelect != null) {
app.getModelSynchronize().rolledDice();
gameView.getGuiHandler().hideText();
}
else if(cardLayerSelect != null) {
//cardSelect
if(cardLayerSelect.isSelectable()) gameView.getGuiHandler().selectCard(cardLayerSelect);
}
@@ -118,11 +124,11 @@ else if(boardSelect != null) {
}
if(name.equals("Test") &&isPressed){
if(app.getView() instanceof GameView gameView){
gameView.getGuiHandler().rollRankingResult(Color.AIRFORCE, 1);
gameView.getGuiHandler().rollRankingResult(Color.ARMY, 2);
gameView.getGuiHandler().rollRankingResult(Color.NAVY, 3);
gameView.getGuiHandler().rollRankingResult(Color.CYBER, 4);
// gameView.getGuiHandler().rollRankingResult(Color.AIRFORCE, 1);
// gameView.getGuiHandler().rollRankingResult(Color.ARMY, 2);
// gameView.getGuiHandler().rollRankingResult(Color.NAVY, 3);
// gameView.getGuiHandler().rollRankingResult(Color.CYBER, 4);
gameView.getGuiHandler().showDice();
}
}
}

View File

@@ -149,5 +149,8 @@ void rollRankingResultOwn(Color color, int eye){
ranking++;
}
void diceNow(){
createTopText("Klicke zum Würfeln", 5, 80, ColorRGBA.White, 0);
}
}

View File

@@ -67,6 +67,7 @@ public void showRolledDice(int rollNum, Color color) {
public void showDice() {
cardLayerHandler.showDice();
actionTextHandler.diceNow();
}
public void hideDice() {