Implement sound-playing API
There's no playSoundEffect-equivalent method in the actual client code. Instead, the client just adds some values to the 4 sfx arrays, removes any old queued sound effects, and then bumps the counter, which is what I've done as well.
This commit is contained in:
@@ -177,5 +177,24 @@ public interface Client extends GameEngine
|
||||
List<Projectile> getProjectiles();
|
||||
|
||||
|
||||
/**
|
||||
* Play a sound effect at the player's current location.
|
||||
* This is how UI, and player-generated (e.g. mining, woodcutting) sound effects are normally played
|
||||
*
|
||||
* @param id the ID of the sound to play
|
||||
*/
|
||||
void playSoundEffect(int id);
|
||||
|
||||
/**
|
||||
* Play a sound effect from some point in the world.
|
||||
*
|
||||
* @param id the ID of the sound to play
|
||||
* @param x the ground coordinate on the x axis
|
||||
* @param y the ground coordinate on the y axis
|
||||
* @param range the number of tiles away that the sound can be heard from
|
||||
*/
|
||||
void playSoundEffect(int id, int x, int y, int range);
|
||||
|
||||
|
||||
BufferProvider getBufferProvider();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user