package projectzombie.audio;

import java.util.Random;

import gl_engine.vec.Vec3d;

public class AudioRandom extends AudioObject
{
	private AudioObject[] audioObjects;
	private static Random rand = new Random();

	public AudioRandom(AudioObject ... audioObjects) {
		super(null, 0);
		
		// Set the specified parameters
		this.audioObjects = audioObjects;
	}
	
	@Override
	public void init() {
	}
	
	@Override
	public void play(Vec3d pos, double volume) {
		audioObjects[(int)(rand.nextDouble()*audioObjects.length)].play(pos, volume);
	}
	
}
