mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 18:23:44 +01:00
added documentation in client package
This commit is contained in:
parent
580d81a621
commit
065049f663
@ -15,7 +15,7 @@ import com.jme3.audio.AudioData;
|
||||
import com.jme3.audio.AudioNode;
|
||||
|
||||
/**
|
||||
* Handles the background music beeing played. Is able to start and stop the music. Set the Volume of the Audio.
|
||||
* Handles the background music being played. Is able to start and stop the music. Set the Volume of the Audio.
|
||||
*/
|
||||
public class GameMusic extends AbstractAppState{
|
||||
private static final Logger LOGGER = System.getLogger(GameMusic.class.getName());
|
||||
|
@ -27,9 +27,25 @@ import static pp.util.PreferencesUtils.getPreferences;
|
||||
* An application state that plays sounds.
|
||||
*/
|
||||
public class GameSound extends AbstractAppState implements GameEventListener {
|
||||
|
||||
/**
|
||||
* Logger instance for logging messages related to GameSound.
|
||||
*/
|
||||
private static final Logger LOGGER = System.getLogger(GameSound.class.getName());
|
||||
|
||||
/**
|
||||
* Preferences instance for managing GameSound-related settings.
|
||||
*/
|
||||
private static final Preferences PREFERENCES = getPreferences(GameSound.class);
|
||||
|
||||
/**
|
||||
* Preference key for enabling or disabling GameSound.
|
||||
*/
|
||||
private static final String ENABLED_PREF = "enabled"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Preference key for storing the volume level of GameSound.
|
||||
*/
|
||||
private static final String VOLUME_PREF = "volume"; //NON-NLS
|
||||
|
||||
private AudioNode passStartSound;
|
||||
@ -223,6 +239,11 @@ public class GameSound extends AbstractAppState implements GameEventListener {
|
||||
PREFERENCES.putFloat(VOLUME_PREF, vol);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides {@link SoundEvent#notifyListener(GameEventListener)}
|
||||
* @param event the received event
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void receivedEvent(SoundEvent event) {
|
||||
switch (event.sound()) {
|
||||
|
@ -48,7 +48,7 @@ import pp.monopoly.notification.InfoTextEvent;
|
||||
import pp.monopoly.notification.Sound;
|
||||
|
||||
/**
|
||||
* The main class for the Battleship client application.
|
||||
* The main class for the Monopoly client application.
|
||||
* It manages the initialization, input setup, GUI setup, and game states for the client.
|
||||
*/
|
||||
public class MonopolyApp extends SimpleApplication implements MonopolyClient, GameEventListener {
|
||||
|
Loading…
Reference in New Issue
Block a user