mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Add a 'your game can start' sound
This commit is contained in:
parent
ed429b0c37
commit
042e64aeb8
3 changed files with 12 additions and 1 deletions
BIN
Mage.Client/sounds/GameCanStart.wav
Normal file
BIN
Mage.Client/sounds/GameCanStart.wav
Normal file
Binary file not shown.
|
@ -438,7 +438,10 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
|
|||
int current = getPlayersCount(tableView);
|
||||
if (current != count) {
|
||||
if (count > 0) {
|
||||
if (current > count) {
|
||||
if (current == tableView.getSeats().size()) {
|
||||
MageTray.instance.displayMessage("The game can start.");
|
||||
AudioManager.playGameCanStart();
|
||||
} else if (current > count) {
|
||||
MageTray.instance.displayMessage("New player joined your game.");
|
||||
AudioManager.playPlayerJoinedTable();
|
||||
} else {
|
||||
|
|
|
@ -40,6 +40,7 @@ public class AudioManager {
|
|||
private MageClip tournamentStarted = null;
|
||||
private MageClip yourGameStarted = null;
|
||||
private MageClip playerJoinedTable = null;
|
||||
private MageClip gameCanStart = null;
|
||||
private MageClip playerSubmittedDeck = null;
|
||||
private MageClip playerWhispered = null;
|
||||
private MageClip playerLeft = null;
|
||||
|
@ -218,6 +219,13 @@ public class AudioManager {
|
|||
}
|
||||
checkAndPlayClip(audioManager.playerJoinedTable);
|
||||
}
|
||||
|
||||
public static void playGameCanStart() {
|
||||
if (audioManager.gameCanStart == null) {
|
||||
audioManager.gameCanStart = new MageClip(Constants.BASE_SOUND_PATH + "GameCanStart.wav", AudioGroup.OtherSounds);
|
||||
}
|
||||
checkAndPlayClip(audioManager.gameCanStart);
|
||||
}
|
||||
|
||||
public static void playYourGameStarted() {
|
||||
if (audioManager.yourGameStarted == null) {
|
||||
|
|
Loading…
Reference in a new issue