Package games.stendhal.client.sound

Examples of games.stendhal.client.sound.SoundGroup.play()


    ClientSingletonRepository.getSound().update();
  }

  protected void playSound(String groupName, String soundName) {
    SoundGroup group = ClientSingletonRepository.getSound().getGroup(groupName);
    group.play(soundName, 0, mAudibleArea, new Time(), false, true);
  }

  protected void playRandomSoundFromCategory(String groupName, String categoryName) {
    SoundGroup group = ClientSingletonRepository.getSound().getGroup(groupName);
    group.play(getRandomSoundFromCategory(categoryName), 0, mAudibleArea, new Time(), false, true);
View Full Code Here


    group.play(soundName, 0, mAudibleArea, new Time(), false, true);
  }

  protected void playRandomSoundFromCategory(String groupName, String categoryName) {
    SoundGroup group = ClientSingletonRepository.getSound().getGroup(groupName);
    group.play(getRandomSoundFromCategory(categoryName), 0, mAudibleArea, new Time(), false, true);
  }

  protected void playRandomSoundFromGroup(String groupName, String categoryName, long waitTimeInMilliSec) {
    if (mWaitTime < System.currentTimeMillis() && Rand.rand(100) < 5) {
      playRandomSoundFromCategory(groupName, categoryName);
View Full Code Here

    final GameObjects gameObjects = client.getGameObjects();
    final StaticGameLayers gameLayers = client.getStaticGameLayers();

    try {
      SoundGroup group = initSoundSystem();
      group.play("harp-1", 0, null, null, false, true);
    } catch (RuntimeException e) {
      logger.error(e, e);
    }

    // keep looping until the game ends
View Full Code Here

    SoundGroup group = ClientSingletonRepository.getSound().getGroup(layer.groupName);
    String soundName = event.get("sound");
    AudibleCircleArea area = new AudibleCircleArea(Algebra.vecf((float)entity.getX(), (float)entity.getY()), radius/4.0f, radius);
    group.loadSound(soundName, "audio:/" + soundName + ".ogg", Type.OGG, false);
    group.play(soundName, volume, 0, area, null, false, true);
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.