public class Bullets {
	private int count;
	private float timeLeft;
	private float damagePerBullet;
	private DeployedUnit target;
	private string launcherName;

	public Bullets(int count, float timeLeft, float damagePerBullet, DeployedUnit target, string launcherName) {
		this.count = count;
		this.timeLeft = timeLeft;
		this.damagePerBullet = damagePerBullet;
		this.target = target;
		this.launcherName = launcherName;
	}

	public bool hasArrived(float delta) {
		timeLeft -= delta;

		return timeLeft <= 0.0f;
	}

	public void dealDamage() {
		if (GameController.fromID(target.getID()) == null) {
			return;
		}

		target.addDamage(count * damagePerBullet);
		NetworkManager.addToLog("A " + launcherName + " round hit a " + target.getClass().getName());
	}
}
