Class CameraSoundPlayer

java.lang.Object
org.collebol.engine.audio.CameraSoundPlayer
All Implemented Interfaces:
AudioPlayer

public class CameraSoundPlayer extends Object implements AudioPlayer
The CameraSoundPlayer class is responsible for playing sounds relative to the camera's position.

Usage:

     CameraSoundPlayer soundPlayer = new CameraSoundPlayer("default", engine);
     soundPlayer.playSound(soundId, gameLocation);
 
Since:
1.0-dev
Author:
ColleBol - contact@collebol.org
  • Constructor Details

    • CameraSoundPlayer

      public CameraSoundPlayer(String name, EJGEngine e)
      CameraSoundPlayer constructor.
      Parameters:
      name - the name of the sound player.
      e - engine instance.
  • Method Details

    • getEngine

      public EJGEngine getEngine()
    • playSound

      public void playSound(int id, GameLocation location)
      Plays a sound at the specified game location relative to the camera position
      Parameters:
      id - the id of the sound to be played.
      location - the game location where the sound should be played.
    • getName

      public String getName()