mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
* Darft - Play countdown sound during drafting only if no card from curretn booster was draft.
This commit is contained in:
parent
39d2551996
commit
532345e28a
3 changed files with 10 additions and 9 deletions
|
@ -65,13 +65,13 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
|||
protected CardEventSource cardEventSource = new CardEventSource();
|
||||
protected BigCard bigCard;
|
||||
protected MageCard markedCard;
|
||||
protected boolean noSound;
|
||||
protected boolean emptyGrid;
|
||||
|
||||
/** Creates new form DraftGrid */
|
||||
public DraftGrid() {
|
||||
initComponents();
|
||||
markedCard = null;
|
||||
noSound= true;
|
||||
emptyGrid= true;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
|
@ -86,12 +86,12 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
|||
|
||||
public void loadBooster(CardsView booster, BigCard bigCard) {
|
||||
if (booster instanceof CardsView && booster.size() == 0) {
|
||||
noSound = true;
|
||||
emptyGrid = true;
|
||||
} else {
|
||||
if (!noSound) {
|
||||
if (!emptyGrid) {
|
||||
AudioManager.playOnDraftSelect();
|
||||
}
|
||||
noSound = false;
|
||||
emptyGrid = false;
|
||||
}
|
||||
this.bigCard = bigCard;
|
||||
this.removeAll();
|
||||
|
@ -210,6 +210,10 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
|||
|
||||
}
|
||||
|
||||
public boolean isEmptyGrid() {
|
||||
return emptyGrid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
}
|
||||
|
|
|
@ -298,9 +298,6 @@
|
|||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer02">
|
||||
<Properties>
|
||||
|
|
|
@ -261,7 +261,7 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
text = text + Integer.toString(second);
|
||||
}
|
||||
this.txtTimeRemaining.setText(text);
|
||||
if (s==6) {
|
||||
if (s==6 && !draftBooster.isEmptyGrid()) {
|
||||
AudioManager.playOnCountdown1();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue