List of usage examples for com.badlogic.gdx.utils LongMap keys
public Keys keys()
From source file:net.spookygames.gdx.sfx.SfxSoundPlayer.java
License:Open Source License
public void update(float delta) { SfxSoundInstance sound;/* w w w . j a va2 s .com*/ LongMap.Keys indexes = sounds.keys(); while (indexes.hasNext) { long index = indexes.next(); sound = sounds.get(index); if (sound.update(delta)) { sounds.remove(index); } } }
From source file:net.spookygames.gdx.sfx.SfxSoundPlayer.java
License:Open Source License
public void stop() { LongMap.Keys indexes = sounds.keys(); while (indexes.hasNext) { sounds.remove(indexes.next()).stop(); } }
From source file:net.spookygames.gdx.sfx.SfxSoundPlayer.java
License:Open Source License
public void pause() { SfxSoundInstance sound;/*from w w w . ja v a 2s . c o m*/ LongMap.Keys indexes = sounds.keys(); while (indexes.hasNext) { long index = indexes.next(); sound = sounds.get(index); if (sound.isLooping()) { sound.pause(); } else { sounds.remove(index).stop(); } } }