Package com.shr4pnel.casino.audio
Class SoundEffect
java.lang.Object
com.shr4pnel.casino.audio.SoundEffect
A representation of a sound effect, which can be played or cancelled
- Since:
- 0.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSoundEffect(String path) Build a sound effect with default (1) volumeSoundEffect(String path, float vol) Build a sound effect, with control over the volume -
Method Summary
-
Constructor Details
-
SoundEffect
Build a sound effect with default (1) volume- Parameters:
path- Path to sound file relative to assets directory
-
SoundEffect
Build a sound effect, with control over the volume- Parameters:
path- Path to sound file relative to assets directoryvol- Volume, from 0-1
-
-
Method Details
-
play
public void play()Plays the sound effect -
cancel
public void cancel()Cancels the sound effect
-