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
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static boolean
    Checks if sound is enabled in the preferences.
    void
    initialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app)
    Initializes the sound effects for the game.
    void
    setEnabled(boolean enabled)
    Sets the enabled state of this AppState.
    void
    setVolume(float vol)
    Sets the volume of music
    void
    Toggles the game sound on or off.
    static float
    Checks 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

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • GameMusic

      public GameMusic()
  • Methodendetails

    • enabledInPreferences

      public static boolean enabledInPreferences()
      Checks if sound is enabled in the preferences.
      Gibt zurück:
      true if sound is enabled, false otherwise.
    • 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. Overrides AbstractAppState.initialize(AppStateManager, Application)
      Angegeben von:
      initialize in Schnittstelle com.jme3.app.state.AppState
      Setzt außer Kraft:
      initialize in Klasse com.jme3.app.state.AbstractAppState
      Parameter:
      stateManager - The state manager
      app - The application
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets the enabled state of this AppState. Overrides AbstractAppState.setEnabled(boolean)
      Angegeben von:
      setEnabled in Schnittstelle com.jme3.app.state.AppState
      Setzt außer Kraft:
      setEnabled in Klasse com.jme3.app.state.AbstractAppState
      Parameter:
      enabled - true to enable the AppState, false to 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