package ecs.components;

import ecs.core.Component;

class Emitter extends Component {
	public var interval:Float;
	public var perEmit:Int;
	public var radius:Float;
	public var maxTtl:Float;

	public var time:Float = 0;

	public var colors:Array<Int> = [];

	public var ttl:Null<Float> = null;

	public function new(interval = 0.1, perEmit = 1, radius = 10., maxTtl = 1., ?colors:Array<Int>) {
		super();

		this.interval = interval;
		this.perEmit = perEmit;
		this.radius = radius;
		this.maxTtl = maxTtl;

		if (colors != null)
			this.colors = colors;
	}
}
