Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.engine.resources.BaseAudioResources Class Referenceabstract
Inheritance diagram for com.mygdx.game.engine.resources.BaseAudioResources:
com.mygdx.game.engine.resources.BaseResource com.mygdx.game.GameAudioResources

Public Member Functions

Sound getSound (String soundKey)
 
Music getMusic (String musicKey)
 
void stopAllSounds ()
 
void stopAllMusic ()
 
void clean ()
 
void disposeSounds ()
 
void disposeMusic ()
 
- Public Member Functions inherited from com.mygdx.game.engine.resources.BaseResource
void loadRequest (AssetManager assetManager)
 
abstract void clean ()
 

Protected Member Functions

void loadResourceMusic (String key, String path)
 
void loadResourceSound (String key, String path)
 
- Protected Member Functions inherited from com.mygdx.game.engine.resources.BaseResource
abstract void load ()
 
AssetManager getAssetManager ()
 

Detailed Description

This class can be inherited to load in audio from the folders and link them to keys. This audio can also be disposed with this class. The audio is put into 2 categories. Music and Sound.

Author
Ramses Di Perna

Member Function Documentation

◆ clean()

void com.mygdx.game.engine.resources.BaseAudioResources.clean ( )

◆ disposeMusic()

void com.mygdx.game.engine.resources.BaseAudioResources.disposeMusic ( )

Disposes all the music

◆ disposeSounds()

void com.mygdx.game.engine.resources.BaseAudioResources.disposeSounds ( )

Disposes all the sounds

◆ getMusic()

Music com.mygdx.game.engine.resources.BaseAudioResources.getMusic ( String  musicKey)

Gets the music which was loaded in the 'load' method with the given key

Parameters
musicKeylinked to the music
Returns
The music linked to the musicKey

◆ getSound()

Sound com.mygdx.game.engine.resources.BaseAudioResources.getSound ( String  soundKey)

Gets the sound which was loaded in the 'load' method with the given key

Parameters
soundKeylinked to the Sound
Returns
The sound linked to the soundKey

◆ loadResourceMusic()

void com.mygdx.game.engine.resources.BaseAudioResources.loadResourceMusic ( String  key,
String  path 
)
protected

Loads a resource into memory. This creates a Music type out of an audio clip. Music is automatically set to looping

Parameters
keyto link the Music under
pathto the audio file to load as Music

◆ loadResourceSound()

void com.mygdx.game.engine.resources.BaseAudioResources.loadResourceSound ( String  key,
String  path 
)
protected

Loads a resource into memory. This creates a Sound type out of an audio clip.

Parameters
keyto link the Sound under
pathto the audio file to load as Sound

◆ stopAllMusic()

void com.mygdx.game.engine.resources.BaseAudioResources.stopAllMusic ( )

◆ stopAllSounds()

void com.mygdx.game.engine.resources.BaseAudioResources.stopAllSounds ( )

The documentation for this class was generated from the following file: