scheduleRandomSound method
void
scheduleRandomSound(
- RandomSound sound
inherited
Schedule a random sound to play.
Implementation
void scheduleRandomSound(final RandomSound sound) {
final int offset;
if (sound.minInterval == sound.maxInterval) {
offset = 0;
} else {
offset = game.random.nextInt(sound.maxInterval - sound.minInterval);
}
getRandomSoundNextPlay(sound).runAfter = sound.minInterval + offset;
}