mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Added attacker to canBlock method.
This commit is contained in:
parent
7edffebb5d
commit
42812541b9
11 changed files with 24 additions and 15 deletions
|
|
@ -160,12 +160,15 @@ public class MageBook extends JComponent {
|
|||
final String _set = set;
|
||||
tab.setObserver(new Command() {
|
||||
public void execute() {
|
||||
currentPage = 0;
|
||||
currentSet = _set;
|
||||
pageLeft.setVisible(false);
|
||||
pageRight.setVisible(false);
|
||||
addSetTabs();
|
||||
showCards();
|
||||
if (currentSet != _set || currentPage != 0) {
|
||||
AudioManager.playAnotherTab();
|
||||
currentPage = 0;
|
||||
currentSet = _set;
|
||||
pageLeft.setVisible(false);
|
||||
pageRight.setVisible(false);
|
||||
addSetTabs();
|
||||
showCards();
|
||||
}
|
||||
}
|
||||
});
|
||||
currentPanel.add(tab, JLayeredPane.DEFAULT_LAYER + count++, 0);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public class AudioManager {
|
|||
audioManager = new AudioManager();
|
||||
audioManager.nextPageClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav"); //sounds better than OnNextPage
|
||||
audioManager.prevPageClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav");
|
||||
audioManager.anotherTabClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPage.wav");
|
||||
audioManager.nextPhaseClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPhase.wav");
|
||||
audioManager.endTurnClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnEndTurn.wav");
|
||||
audioManager.tapPermanentClip = audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnTapPermanent.wav");
|
||||
|
|
@ -51,6 +52,10 @@ public class AudioManager {
|
|||
checkAndPlayClip(getManager().prevPageClip);
|
||||
}
|
||||
|
||||
public static void playAnotherTab() {
|
||||
checkAndPlayClip(getManager().anotherTabClip);
|
||||
}
|
||||
|
||||
public static void playNextPhase() {
|
||||
checkAndPlayClip(getManager().nextPhaseClip);
|
||||
}
|
||||
|
|
@ -146,6 +151,7 @@ public class AudioManager {
|
|||
|
||||
private Clip nextPageClip = null;
|
||||
private Clip prevPageClip = null;
|
||||
private Clip anotherTabClip = null;
|
||||
private Clip nextPhaseClip = null;
|
||||
private Clip endTurnClip = null;
|
||||
private Clip tapPermanentClip = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue