merge
This commit is contained in:
		@@ -121,6 +121,7 @@ private void handleGame(Notification notification) {
 | 
			
		||||
            delay = STANDARD_DELAY;
 | 
			
		||||
        } else if (notification instanceof ActivePlayerNotification n) {
 | 
			
		||||
            gameView.getGuiHandler().setActivePlayer(n.getColor());
 | 
			
		||||
            boardHandler.hideDice();
 | 
			
		||||
            if(n.getColor() != ownColor) boardHandler.showDice(n.getColor());
 | 
			
		||||
            app.getAcousticHandler().playSound(MdgaSound.UI90);
 | 
			
		||||
            delay = STANDARD_DELAY;
 | 
			
		||||
@@ -166,10 +167,12 @@ private void handleGame(Notification notification) {
 | 
			
		||||
            if(n.isMoveStart()) {
 | 
			
		||||
                //StartMove
 | 
			
		||||
                boardHandler.movePieceStartAnim(n.getPiece(), n.getMoveIndex());
 | 
			
		||||
                waitForAnimation = true;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                //InfieldMove
 | 
			
		||||
                boardHandler.movePieceAnim(n.getPiece(), n.getStartIndex(), n.getMoveIndex());
 | 
			
		||||
                waitForAnimation = true;
 | 
			
		||||
            }
 | 
			
		||||
            guiHandler.hideText();
 | 
			
		||||
        } else if (notification instanceof ThrowPieceNotification n) {
 | 
			
		||||
@@ -207,7 +210,6 @@ public void run() {
 | 
			
		||||
                waitForAnimation = true;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                boardHandler.hideDice();
 | 
			
		||||
                if (n.isTurbo()) guiHandler.showRolledDiceMult(n.getEyes(), n.getMultiplier(), n.getColor());
 | 
			
		||||
                else guiHandler.showRolledDice(n.getEyes(), n.getColor());
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -473,6 +473,7 @@ private void movePieceStart(UUID uuid, int nodeIndex){
 | 
			
		||||
        removeItemFromMapList(waitingPiecesMap, color, pieceControl);
 | 
			
		||||
        waitingNodes.get(color).remove(uuid);
 | 
			
		||||
        app.getModelSynchronize().animationEnd();
 | 
			
		||||
        app.getModelSynchronize().animationEnd();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -486,6 +487,7 @@ private void movePiece(UUID uuid, int curIndex, int moveIndex){
 | 
			
		||||
 | 
			
		||||
        movePieceRek(uuid, curIndex, moveIndex);
 | 
			
		||||
        app.getModelSynchronize().animationEnd();
 | 
			
		||||
        app.getModelSynchronize().animationEnd();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@ public class GameView extends MdgaView {
 | 
			
		||||
    private GuiHandler guiHandler;
 | 
			
		||||
 | 
			
		||||
    private ButtonLeft leaveButton;
 | 
			
		||||
    private ButtonRight confirmButton;
 | 
			
		||||
    public ButtonRight confirmButton;
 | 
			
		||||
 | 
			
		||||
    private ButtonRight noPowerButton;
 | 
			
		||||
 | 
			
		||||
@@ -28,6 +28,9 @@ public class GameView extends MdgaView {
 | 
			
		||||
 | 
			
		||||
    private FilterPostProcessor fpp;
 | 
			
		||||
 | 
			
		||||
    public boolean needConfirm = false;
 | 
			
		||||
    public boolean needNoPower = false;
 | 
			
		||||
 | 
			
		||||
    private Node guiHandlerNode = new Node();
 | 
			
		||||
 | 
			
		||||
    public GameView(MdgaApp app) {
 | 
			
		||||
@@ -116,19 +119,26 @@ public Color getOwnColor() {
 | 
			
		||||
    public void needConfirm() {
 | 
			
		||||
        noPowerButton.hide();
 | 
			
		||||
        confirmButton.show();
 | 
			
		||||
 | 
			
		||||
        needConfirm = true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void noConfirm() {
 | 
			
		||||
        confirmButton.hide();
 | 
			
		||||
 | 
			
		||||
        needConfirm = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void showNoPower() {
 | 
			
		||||
        confirmButton.hide();
 | 
			
		||||
        noPowerButton.show();
 | 
			
		||||
 | 
			
		||||
        needNoPower = true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void hideNoPower() {
 | 
			
		||||
        noPowerButton.hide();
 | 
			
		||||
        needNoPower = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void enterInterrupt(Color color) {
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,6 @@ public void enter() {
 | 
			
		||||
    public void leave() {
 | 
			
		||||
        onLeave();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        settingsButton.hide();
 | 
			
		||||
 | 
			
		||||
        while (settingsDepth > 0) {
 | 
			
		||||
@@ -197,7 +196,13 @@ public void pressForward() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (this instanceof GameView gameView) {
 | 
			
		||||
            app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
 | 
			
		||||
            if(gameView.needConfirm) {
 | 
			
		||||
                app.getModelSynchronize().confirm();
 | 
			
		||||
            } else if(gameView.needNoPower) {
 | 
			
		||||
                app.getModelSynchronize().confirm();
 | 
			
		||||
            } else {
 | 
			
		||||
                app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (this instanceof CeremonyView ceremonyView) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user