/**
 * 
 */
package studio.junk.jam.coloritum.entities.components;

import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.ComponentMapper;

import box2dLight.Light;

/**
 * @author held03
 */
public class Lights implements Component {
	public static final ComponentMapper<Lights> mapper = ComponentMapper.getFor(Lights.class);

	public float[]	distance;
	public Light[]	lights;

	/**
	 * 
	 */
	public Lights(Light light) {
		this.lights = new Light[] { light };
		distance = new float[] { light.getDistance() };
	}

	/**
	 * 
	 */
	public Lights(Light... lights) {
		this.lights = lights;
		distance = new float[lights.length];
		for (int i = 0; i < distance.length; i++) {
			distance[i] = lights[i].getDistance();
		}
	}

}
