Class DogSoundPlayer

java.lang.Object
com.csse3200.game.components.audio.DogSoundPlayer

public class DogSoundPlayer extends Object
DogSoundPlayer class responsible for managing the playback of dog-related sounds. This class focuses on handling the panting and other dog-specific sounds.
  • Constructor Details

    • DogSoundPlayer

      public DogSoundPlayer(String pantingSoundPath, String barkingSoundPath)
  • 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.