Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.model.players.sounds;
- import server.model.players.Client;
- /**
- * @author Pakku
- */
- public class SoundHandler {
- private Client c;
- public SoundHandler(Client c) {
- this.c = c;
- }
- public void playSound(int sound, int delay) {
- if(c.getOutStream() != null && c != null ) {
- c.outStream.createFrame(174);
- c.outStream.writeWord(sound);
- c.outStream.writeByte(c.soundVolume);
- c.outStream.writeWord(delay);
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- }
- }
- public void playSound(int sound) {
- if(c.getOutStream() != null && c != null ) {
- c.outStream.createFrame(174);
- c.outStream.writeWord(sound);
- c.outStream.writeByte(c.soundVolume);
- c.outStream.writeWord(0);
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- }
- }
- }
Add Comment
Please, Sign In to add comment