mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Added option that AbilityPicker is forced to show if ability or spell has no or only tap cost (not finished yet).
This commit is contained in:
parent
81eaac46c7
commit
ee76ccfee4
14 changed files with 194 additions and 103 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tabsPanel" alignment="0" pref="562" max="32767" attributes="0"/>
|
||||
<Component id="tabsPanel" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
|
||||
|
|
@ -82,10 +82,10 @@
|
|||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="main_card" min="-2" pref="68" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="main_game" min="-2" pref="103" max="-2" attributes="0"/>
|
||||
<Component id="main_game" min="-2" pref="91" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="main_gamelog" min="-2" pref="49" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="153" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="171" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -179,6 +179,7 @@
|
|||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Show player names on avatar permanently"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Instead showing the names only if you hoover over the avatar with the mouse, the name is shown all the time."/>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
|
@ -190,7 +191,7 @@
|
|||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="showAbilityPickerForSimpleAbilities">
|
||||
<Component class="javax.swing.JCheckBox" name="showAbilityPickerForced">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Show ability picker for abilities without costs"/>
|
||||
|
|
@ -198,7 +199,7 @@
|
|||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showAbilityPickerForSimpleAbilitiesActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showAbilityPickerForcedActionPerformed"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
|
|
@ -758,10 +759,10 @@
|
|||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="sounds_clips" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sounds_clips" min="-2" pref="68" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="sounds_backgroundMusic" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="229" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="247" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -795,7 +796,7 @@
|
|||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -835,7 +836,7 @@
|
|||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtBattlefieldIBGMPath" pref="297" max="32767" attributes="0"/>
|
||||
<Component id="txtBattlefieldIBGMPath" pref="332" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="btnBattlefieldBGMBrowse" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_HAND_USE_BIG_CARDS = "handUseBigCards";
|
||||
public static final String KEY_PERMANENTS_IN_ONE_PILE = "nonLandPermanentsInOnePile";
|
||||
public static final String KEY_SHOW_PLAYER_NAMES_PERMANENTLY = "showPlayerNamesPermanently";
|
||||
public static final String KEY_SHOW_ABILITY_PICKER = "showAbilityPicker";
|
||||
public static final String KEY_SHOW_ABILITY_PICKER_FORCED = "showAbilityPicker";
|
||||
public static final String KEY_GAME_LOG_AUTO_SAVE = "gameLogAutoSave";
|
||||
|
||||
public static final String KEY_CARD_IMAGES_USE_DEFAULT = "cardImagesUseDefault";
|
||||
|
|
@ -272,7 +272,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
main_game = new javax.swing.JPanel();
|
||||
nonLandPermanentsInOnePile = new javax.swing.JCheckBox();
|
||||
showPlayerNamesPermanently = new javax.swing.JCheckBox();
|
||||
showAbilityPickerForSimpleAbilities = new javax.swing.JCheckBox();
|
||||
showAbilityPickerForced = new javax.swing.JCheckBox();
|
||||
main_gamelog = new javax.swing.JPanel();
|
||||
cbGameLogAutoSave = new javax.swing.JCheckBox();
|
||||
tabPhases = new javax.swing.JPanel();
|
||||
|
|
@ -402,6 +402,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
showPlayerNamesPermanently.setSelected(true);
|
||||
showPlayerNamesPermanently.setText("Show player names on avatar permanently");
|
||||
showPlayerNamesPermanently.setToolTipText("Instead showing the names only if you hoover over the avatar with the mouse, the name is shown all the time.");
|
||||
showPlayerNamesPermanently.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
showPlayerNamesPermanently.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
@ -410,16 +411,16 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
});
|
||||
main_game.add(showPlayerNamesPermanently, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
showAbilityPickerForSimpleAbilities.setSelected(true);
|
||||
showAbilityPickerForSimpleAbilities.setText("Show ability picker for abilities without costs");
|
||||
showAbilityPickerForSimpleAbilities.setToolTipText("This prevents that you accidently activate abilities without costs that e.g. tap the permanent.");
|
||||
showAbilityPickerForSimpleAbilities.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
showAbilityPickerForSimpleAbilities.addActionListener(new java.awt.event.ActionListener() {
|
||||
showAbilityPickerForced.setSelected(true);
|
||||
showAbilityPickerForced.setText("Show ability picker for abilities without costs");
|
||||
showAbilityPickerForced.setToolTipText("This prevents that you accidently activate abilities without costs that e.g. tap the permanent.");
|
||||
showAbilityPickerForced.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
showAbilityPickerForced.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
showAbilityPickerForSimpleAbilitiesActionPerformed(evt);
|
||||
showAbilityPickerForcedActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
main_game.add(showAbilityPickerForSimpleAbilities, java.awt.BorderLayout.PAGE_END);
|
||||
main_game.add(showAbilityPickerForced, java.awt.BorderLayout.PAGE_END);
|
||||
|
||||
main_gamelog.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game log"));
|
||||
main_gamelog.setLayout(new java.awt.BorderLayout());
|
||||
|
|
@ -451,10 +452,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.addContainerGap()
|
||||
.addComponent(main_card, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(main_game, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(main_game, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(main_gamelog, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(153, Short.MAX_VALUE))
|
||||
.addContainerGap(171, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
main_card.getAccessibleContext().setAccessibleName("Game panel");
|
||||
|
|
@ -791,7 +792,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
cbEnableGameSoundsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
sounds_clips.add(cbEnableGameSounds, java.awt.BorderLayout.CENTER);
|
||||
sounds_clips.add(cbEnableGameSounds, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
cbEnableOtherSounds.setText("Enable other sounds");
|
||||
cbEnableOtherSounds.setToolTipText("Sounds that will be played for actions outside of games (e.g. whisper, player joins your game, player submits a deck ...).");
|
||||
|
|
@ -837,7 +838,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.addContainerGap()
|
||||
.addComponent(jLabel16)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtBattlefieldIBGMPath, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
|
||||
.addComponent(txtBattlefieldIBGMPath, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(btnBattlefieldBGMBrowse))
|
||||
.addGroup(sounds_backgroundMusicLayout.createSequentialGroup()
|
||||
|
|
@ -870,10 +871,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
tabSoundsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(tabSoundsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(sounds_clips, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(sounds_clips, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(sounds_backgroundMusic, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(229, Short.MAX_VALUE))
|
||||
.addContainerGap(247, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
sounds_clips.getAccessibleContext().setAccessibleDescription("");
|
||||
|
|
@ -1285,7 +1286,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tabsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 562, Short.MAX_VALUE)
|
||||
.addComponent(tabsPanel)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(saveButton)
|
||||
|
|
@ -1315,7 +1316,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
save(prefs, dialog.displayBigCardsInHand, KEY_HAND_USE_BIG_CARDS, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.showAbilityPickerForSimpleAbilities, KEY_SHOW_ABILITY_PICKER, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
|
||||
// Phases
|
||||
|
|
@ -1369,6 +1370,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
|
||||
try {
|
||||
MageFrame.getSession().updatePreferencesForServer(
|
||||
getSelectedAvatar(),
|
||||
dialog.showAbilityPickerForced.isSelected());
|
||||
|
||||
prefs.flush();
|
||||
} catch (BackingStoreException ex) {
|
||||
ex.printStackTrace();
|
||||
|
|
@ -1574,9 +1579,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
}//GEN-LAST:event_showToolTipsInAnyZoneActionPerformed
|
||||
|
||||
private void showAbilityPickerForSimpleAbilitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showAbilityPickerForSimpleAbilitiesActionPerformed
|
||||
private void showAbilityPickerForcedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showAbilityPickerForcedActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_showAbilityPickerForSimpleAbilitiesActionPerformed
|
||||
}//GEN-LAST:event_showAbilityPickerForcedActionPerformed
|
||||
|
||||
private void cbEnableOtherSoundsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbEnableOtherSoundsActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
|
@ -1666,7 +1671,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
load(prefs, dialog.showToolTipsInAnyZone, KEY_SHOW_TOOLTIPS_ANY_ZONE, "true");
|
||||
load(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true");
|
||||
load(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true");
|
||||
load(prefs, dialog.showAbilityPickerForSimpleAbilities, KEY_SHOW_ABILITY_PICKER, "true");
|
||||
load(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true");
|
||||
load(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true");
|
||||
}
|
||||
|
||||
|
|
@ -1956,7 +1961,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public void mousePressed(MouseEvent e) {
|
||||
if (selectedAvatarId != id) {
|
||||
setSelectedId(id);
|
||||
MageFrame.getSession().updateAvatar(id);
|
||||
MageFrame.getSession().updatePreferencesForServer(id, PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE, "true").equals("true"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -2040,7 +2045,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JPanel pnlProxySettings;
|
||||
private javax.swing.JCheckBox rememberPswd;
|
||||
private javax.swing.JButton saveButton;
|
||||
private javax.swing.JCheckBox showAbilityPickerForSimpleAbilities;
|
||||
private javax.swing.JCheckBox showAbilityPickerForced;
|
||||
private javax.swing.JCheckBox showPlayerNamesPermanently;
|
||||
private javax.swing.JCheckBox showToolTipsInAnyZone;
|
||||
private javax.swing.JPanel sounds_backgroundMusic;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
package mage.client.util.audio;
|
||||
|
||||
/**
|
||||
*
|
||||
* Used to dived the sound clips in different groups to make them active by group
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum AudioGroup {
|
||||
|
|
|
|||
|
|
@ -46,129 +46,147 @@ public class AudioManager {
|
|||
/**
|
||||
* AudioManager singleton.
|
||||
*/
|
||||
private static AudioManager audioManager = null;
|
||||
private static final AudioManager audioManager = new AudioManager();;
|
||||
|
||||
|
||||
public static AudioManager getManager() {
|
||||
if (audioManager == null) {
|
||||
audioManager = new AudioManager();
|
||||
audioManager.nextPageClip =
|
||||
new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav"),
|
||||
AudioGroup.OtherSounds); //sounds better than OnNextPage
|
||||
audioManager.prevPageClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
audioManager.anotherTabClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPage.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
|
||||
audioManager.playerSubmittedDeck = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerSubmittedDeck.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
audioManager.playerWhispered = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerWhispered.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
audioManager.playerLeft = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerLeft.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
|
||||
// in games sounds
|
||||
audioManager.nextPhaseClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPhase.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.endTurnClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnEndTurn.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.tapPermanentClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnTapPermanent.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.summonClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnSummon.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.diedCreatureClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnSummon-.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.drawClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnDraw.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.buttonOkClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnButtonOk.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.buttonCancelClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnButtonCancel.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.attackClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAttack.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.blockClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnBlock.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.addPermanentClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAddPermanent.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.addArtifactClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAddArtifact.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.updateStackClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnStackNew.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.onHover = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnHover.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.playerWon = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerWon.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
audioManager.playerLost = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerLost.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
return audioManager;
|
||||
}
|
||||
|
||||
public static void playNextPage() {
|
||||
if (audioManager.nextPageClip == null) {
|
||||
audioManager.nextPageClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().nextPageClip);
|
||||
}
|
||||
|
||||
public static void playPrevPage() {
|
||||
if (audioManager.prevPageClip == null) {
|
||||
audioManager.prevPageClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPrevPage.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().prevPageClip);
|
||||
}
|
||||
|
||||
public static void playAnotherTab() {
|
||||
if (audioManager.anotherTabClip == null) {
|
||||
audioManager.anotherTabClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPage.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().anotherTabClip);
|
||||
}
|
||||
|
||||
public static void playNextPhase() {
|
||||
if (audioManager.nextPhaseClip == null) {
|
||||
audioManager.nextPhaseClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnNextPhase.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().nextPhaseClip);
|
||||
}
|
||||
|
||||
public static void playEndTurn() {
|
||||
if (audioManager.endTurnClip == null) {
|
||||
audioManager.endTurnClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnEndTurn.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().endTurnClip);
|
||||
}
|
||||
|
||||
public static void playTapPermanent() {
|
||||
if (audioManager.tapPermanentClip == null) {
|
||||
audioManager.tapPermanentClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnTapPermanent.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().tapPermanentClip);
|
||||
}
|
||||
|
||||
public static void playSummon() {
|
||||
if (audioManager.summonClip == null) {
|
||||
audioManager.summonClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnSummon.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().summonClip);
|
||||
}
|
||||
|
||||
public static void playDiedCreature() {
|
||||
if (audioManager.diedCreatureClip == null) {
|
||||
audioManager.diedCreatureClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnSummon-.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().diedCreatureClip);
|
||||
}
|
||||
|
||||
public static void playDraw() {
|
||||
if (audioManager.drawClip == null) {
|
||||
audioManager.drawClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnDraw.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().drawClip);
|
||||
}
|
||||
|
||||
public static void playButtonOk() {
|
||||
if (audioManager.buttonOkClip == null) {
|
||||
audioManager.buttonOkClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnButtonOk.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().buttonOkClip);
|
||||
}
|
||||
|
||||
public static void playButtonCancel() {
|
||||
if (audioManager.buttonCancelClip == null) {
|
||||
audioManager.buttonCancelClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnButtonCancel.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
|
||||
}
|
||||
checkAndPlayClip(getManager().buttonCancelClip);
|
||||
}
|
||||
|
||||
public static void playAttack() {
|
||||
if (audioManager.attackClip == null) {
|
||||
audioManager.attackClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAttack.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().attackClip);
|
||||
}
|
||||
|
||||
public static void playBlock() {
|
||||
if (audioManager.blockClip == null) {
|
||||
audioManager.blockClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnBlock.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().blockClip);
|
||||
}
|
||||
|
||||
public static void playAddPermanent() {
|
||||
if (audioManager.addPermanentClip == null) {
|
||||
audioManager.addPermanentClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAddPermanent.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().addPermanentClip);
|
||||
}
|
||||
|
||||
public static void playAddArtifact() {
|
||||
if (audioManager.addArtifactClip == null) {
|
||||
audioManager.addArtifactClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnAddArtifact.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().addArtifactClip);
|
||||
}
|
||||
|
||||
public static void playStackNew() {
|
||||
if (audioManager.updateStackClip == null) {
|
||||
audioManager.updateStackClip = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnStackNew.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().updateStackClip);
|
||||
}
|
||||
|
||||
public static void playOnHover() {
|
||||
if (audioManager.onHover == null) {
|
||||
audioManager.onHover = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnHover.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().onHover);
|
||||
}
|
||||
|
||||
|
|
@ -181,22 +199,42 @@ public class AudioManager {
|
|||
}
|
||||
|
||||
public static void playPlayerWhispered() {
|
||||
if (audioManager.playerWhispered == null) {
|
||||
audioManager.playerWhispered = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerWhispered.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().playerWhispered);
|
||||
}
|
||||
|
||||
public static void playPlayerSubmittedDeck() {
|
||||
if(audioManager.playerSubmittedDeck == null) {
|
||||
audioManager.playerSubmittedDeck = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerSubmittedDeck.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().playerSubmittedDeck);
|
||||
}
|
||||
|
||||
public static void playPlayerLeft() {
|
||||
if(audioManager.playerLeft == null) {
|
||||
audioManager.playerLeft = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerLeft.wav"),
|
||||
AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().playerLeft);
|
||||
}
|
||||
|
||||
public static void playPlayerLost() {
|
||||
if(audioManager.playerLost == null) {
|
||||
audioManager.playerLost = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerLost.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().playerLost);
|
||||
}
|
||||
|
||||
public static void playPlayerWon() {
|
||||
if(audioManager.playerWon == null) {
|
||||
audioManager.playerWon = new MageClip(audioManager.loadClip(Constants.BASE_SOUND_PATH + "OnPlayerWon.wav"),
|
||||
AudioGroup.GameSounds);
|
||||
}
|
||||
checkAndPlayClip(getManager().playerWon);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue