mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
cleanup
This commit is contained in:
parent
34ecd2277b
commit
e1190cd4a2
@ -20,7 +20,6 @@ import com.simsilica.lemur.event.MouseEventControl;
|
|||||||
import com.simsilica.lemur.event.MouseListener;
|
import com.simsilica.lemur.event.MouseListener;
|
||||||
import com.simsilica.lemur.style.ElementId;
|
import com.simsilica.lemur.style.ElementId;
|
||||||
import pp.dialog.Dialog;
|
import pp.dialog.Dialog;
|
||||||
import pp.monopoly.client.BoardAppState;
|
|
||||||
import pp.monopoly.client.MonopolyApp;
|
import pp.monopoly.client.MonopolyApp;
|
||||||
import pp.monopoly.client.gui.popups.Bankrupt;
|
import pp.monopoly.client.gui.popups.Bankrupt;
|
||||||
import pp.monopoly.game.server.Player;
|
import pp.monopoly.game.server.Player;
|
||||||
@ -197,16 +196,6 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
menuContainer.setBackground(null);
|
menuContainer.setBackground(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the color of the current player.
|
|
||||||
*
|
|
||||||
* @return The color of the current player.
|
|
||||||
*/
|
|
||||||
private ColorRGBA getCurrentPlayerColor() {
|
|
||||||
Player currentPlayer = playerHandler.getPlayerById(app.getId());
|
|
||||||
return Player.getColor(currentPlayer.getId()).getColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the dice display section of the toolbar interface.
|
* Creates the dice display section of the toolbar interface.
|
||||||
*
|
*
|
||||||
@ -291,12 +280,6 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
startDiceAnimation();
|
startDiceAnimation();
|
||||||
app.getGameLogic().send(new RollDice());
|
app.getGameLogic().send(new RollDice());
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
|
|
||||||
// Animation in BoardAppState starten
|
|
||||||
BoardAppState boardAppState = app.getStateManager().getState(BoardAppState.class);
|
|
||||||
if (boardAppState != null) {
|
|
||||||
boardAppState.onRollDicePressed(); // Animation starten
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,18 +344,6 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
return endTurnButton;
|
return endTurnButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a background with the specified color.
|
|
||||||
*
|
|
||||||
* @param color The color of the background.
|
|
||||||
* @return The background component.
|
|
||||||
*/
|
|
||||||
private QuadBackgroundComponent createButtonBackground(ColorRGBA color) {
|
|
||||||
QuadBackgroundComponent background = new QuadBackgroundComponent(color);
|
|
||||||
Texture gradient = app.getAssetManager().loadTexture("Textures/gradient.png");
|
|
||||||
if (gradient != null) background.setTexture(gradient);
|
|
||||||
return background;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the end turn event.
|
* Handles the end turn event.
|
||||||
|
Loading…
Reference in New Issue
Block a user