added isStart + (DU)
This commit is contained in:
@@ -128,7 +128,7 @@ private BitmapText createName(String name, boolean first, boolean own){
|
|||||||
//renderedSize = 45
|
//renderedSize = 45
|
||||||
hudText.setSize(TEXT_SIZE);
|
hudText.setSize(TEXT_SIZE);
|
||||||
hudText.setColor(first ? ACTIVE_COLOR : own ? OWN_COLOR : NORMAL_COLOR);
|
hudText.setColor(first ? ACTIVE_COLOR : own ? OWN_COLOR : NORMAL_COLOR);
|
||||||
hudText.setText(name);
|
hudText.setText(own ? name + " (Du)" : name);
|
||||||
hudText.setLocalTranslation(PADDING_LEFT,hudText.getHeight()/2, 0);
|
hudText.setLocalTranslation(PADDING_LEFT,hudText.getHeight()/2, 0);
|
||||||
return hudText;
|
return hudText;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,12 @@ protected void throwPiece(Piece piece) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleShield(UUID uuid) {
|
private void handleShield(UUID uuid) {
|
||||||
if (logic.getGame().getBoard().getInfieldIndexOfPiece(logic.getGame().getPieceThroughUUID(uuid)) % 10 != 0) {
|
Board board = logic.getGame().getBoard();
|
||||||
|
Piece piece = logic.getGame().getPieceThroughUUID(uuid);
|
||||||
|
Node node = board.getInfield()[board.getInfieldIndexOfPiece(piece)];
|
||||||
|
if (node.isStart()) {
|
||||||
logic.getGame().getPieceThroughUUID(uuid).setShield(ShieldState.SUPPRESSED);
|
logic.getGame().getPieceThroughUUID(uuid).setShield(ShieldState.SUPPRESSED);
|
||||||
|
logic.addNotification(new ShieldActiveNotification(uuid));
|
||||||
logic.addNotification(new ShieldSuppressedNotification(uuid));
|
logic.addNotification(new ShieldSuppressedNotification(uuid));
|
||||||
} else {
|
} else {
|
||||||
logic.getGame().getPieceThroughUUID(uuid).setShield(ShieldState.ACTIVE);
|
logic.getGame().getPieceThroughUUID(uuid).setShield(ShieldState.ACTIVE);
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ public Game() {
|
|||||||
*/
|
*/
|
||||||
private void initializeDrawPile() {
|
private void initializeDrawPile() {
|
||||||
// this.addBonusCards(new TurboCard(), AMOUNT_OF_TURBO_CARDS);
|
// this.addBonusCards(new TurboCard(), AMOUNT_OF_TURBO_CARDS);
|
||||||
this.addBonusCards(new SwapCard(), AMOUNT_OF_SWAP_CARDS);
|
// this.addBonusCards(new SwapCard(), AMOUNT_OF_SWAP_CARDS);
|
||||||
// this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
|
this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
|
||||||
Collections.shuffle(this.drawPile);
|
Collections.shuffle(this.drawPile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,4 +99,8 @@ public boolean isOccupied() {
|
|||||||
public boolean isOccupied(Color color) {
|
public boolean isOccupied(Color color) {
|
||||||
return isOccupied() && this.occupant.getColor() == color;
|
return isOccupied() && this.occupant.getColor() == color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStart() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,4 +47,9 @@ public Color getColor() {
|
|||||||
public void setColor(Color color) {
|
public void setColor(Color color) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStart() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user