Package pp.battleship.client.gui
Klasse GameMusic
java.lang.Object
com.jme3.app.state.AbstractAppState
pp.battleship.client.gui.GameMusic
- Alle implementierten Schnittstellen:
com.jme3.app.state.AppState
public class GameMusic
extends com.jme3.app.state.AbstractAppState
-
Feldübersicht
Von Klasse geerbte Felder com.jme3.app.state.AbstractAppState
initialized -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic booleanChecks if sound is enabled in the preferences.voidinitialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app) Initializes the sound effects for the game.voidsetEnabled(boolean enabled) Sets the enabled state of this AppState.voidsetVolume(float vol) Sets the volume of musicvoidToggles the game sound on or off.static floatChecks if sound is enabled in the preferences.Von Klasse geerbte Methoden com.jme3.app.state.AbstractAppState
cleanup, getId, isEnabled, isInitialized, postRender, render, setId, stateAttached, stateDetached, update
-
Konstruktordetails
-
GameMusic
public GameMusic()
-
-
Methodendetails
-
enabledInPreferences
public static boolean enabledInPreferences()Checks if sound is enabled in the preferences.- Gibt zurück:
trueif sound is enabled,falseotherwise.
-
volumeInPreferences
public static float volumeInPreferences()Checks if sound is enabled in the preferences.- Gibt zurück:
- float to which the volume is set
-
initialize
public void initialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app) Initializes the sound effects for the game. OverridesAbstractAppState.initialize(AppStateManager, Application)- Angegeben von:
initializein Schnittstellecom.jme3.app.state.AppState- Setzt außer Kraft:
initializein Klassecom.jme3.app.state.AbstractAppState- Parameter:
stateManager- The state managerapp- The application
-
setEnabled
public void setEnabled(boolean enabled) Sets the enabled state of this AppState. OverridesAbstractAppState.setEnabled(boolean)- Angegeben von:
setEnabledin Schnittstellecom.jme3.app.state.AppState- Setzt außer Kraft:
setEnabledin Klassecom.jme3.app.state.AbstractAppState- Parameter:
enabled-trueto enable the AppState,falseto disable it.
-
toggleSound
public void toggleSound()Toggles the game sound on or off. -
setVolume
public void setVolume(float vol) Sets the volume of music- Parameter:
vol- the volume to which the music should be set
-