Class DogSoundPlayer
java.lang.Object
com.csse3200.game.components.audio.DogSoundPlayer
DogSoundPlayer class responsible for managing the playback of dog-related sounds.
This class focuses on handling the panting and other dog-specific sounds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Plays the barking sound once, using the volume from AudioManager.void
Plays the panting sound in a loop, using the volume from AudioManager.void
Stops the panting sound if it is playing.void
updatePantingSound
(boolean isMoving) Updates the playing state of the panting sound based on movement.
-
Constructor Details
-
DogSoundPlayer
-
-
Method Details
-
playPantingSound
public void playPantingSound()Plays the panting sound in a loop, using the volume from AudioManager. -
stopPantingSound
public void stopPantingSound()Stops the panting sound if it is playing. -
updatePantingSound
public void updatePantingSound(boolean isMoving) Updates the playing state of the panting sound based on movement.- Parameters:
isMoving
- whether the dog is moving and should be panting
-
playBarkingSound
public void playBarkingSound()Plays the barking sound once, using the volume from AudioManager.
-