Class SFXPlayer

java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.renderer.SFXPlayer
All Implemented Interfaces:
EventListener, LineListener

public class SFXPlayer extends Object implements LineListener
Plays a sound depending on the event happening in the game.
Author:
Diana
  • Constructor Details

    • SFXPlayer

      public SFXPlayer()
  • Method Details

    • playSound

      public void playSound(SFX sfx, int priorityLevel)
      Plays a wav file depending on the name of the sound being passed.
      Parameters:
      sfx - SFX object to be get the clip.
      priorityLevel - To determine which sound should be played over others.
    • stopSFX

      public void stopSFX()
      Stops all the current sounds at the creation or deletion of a level.
    • update

      public void update(LineEvent event)
      Specified by:
      update in interface LineListener