Class SFXPlayer
java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.renderer.SFXPlayer
- All Implemented Interfaces:
EventListener
,LineListener
Plays a sound depending on the event happening in the game.
- Author:
- Diana
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SFXPlayer
public SFXPlayer()
-
-
Method Details
-
playSound
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
- Specified by:
update
in interfaceLineListener
-