Package pp.battleship.client
Klasse GameSound
java.lang.Object
com.jme3.app.state.AbstractAppState
pp.battleship.client.GameSound
- Alle implementierten Schnittstellen:
com.jme3.app.state.AppState,pp.battleship.notification.GameEventListener
public class GameSound
extends com.jme3.app.state.AbstractAppState
implements pp.battleship.notification.GameEventListener
An application state that plays sounds.
-
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.voidPlays the explosion sound effect.voidinitialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app) Initializes the sound effects for the game.voidreceivedEvent(pp.battleship.notification.SoundEvent event) voidsetEnabled(boolean enabled) Sets the enabled state of this AppState.voidPlays sound effect when a ship has been destroyed.voidsplash()Plays the splash sound effect.voidToggles the game sound on or off.Von Klasse geerbte Methoden com.jme3.app.state.AbstractAppState
cleanup, getId, isEnabled, isInitialized, postRender, render, setId, stateAttached, stateDetached, updateVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden pp.battleship.notification.GameEventListener
receivedEvent, receivedEvent, receivedEvent, receivedEvent
-
Konstruktordetails
-
GameSound
public GameSound()
-
-
Methodendetails
-
enabledInPreferences
public static boolean enabledInPreferences()Checks if sound is enabled in the preferences.- Gibt zurück:
trueif sound is enabled,falseotherwise.
-
toggleSound
public void toggleSound()Toggles the game sound on or off. -
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.
-
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
-
splash
public void splash()Plays the splash sound effect. -
explosion
public void explosion()Plays the explosion sound effect. -
shipDestroyed
public void shipDestroyed()Plays sound effect when a ship has been destroyed. -
receivedEvent
public void receivedEvent(pp.battleship.notification.SoundEvent event) - Angegeben von:
receivedEventin Schnittstellepp.battleship.notification.GameEventListener
-