@Override
	public void animatedEntityTick(double time) {
		// tick lifetime, kill if expired
		lifeTime += time;
		if(lifeTime >= def.lifeTime){
			kill(null);
			return;
		}
		// move to target
		loc.travelTo(targetLoc, time * def.speed, true);
		// if target is reached, deal damage and kill self
		if(loc.hammingDistanceTo(targetLoc) < 0.1f){
			if(attacker.def.damageRadius > 0){
				GameCtrl.get().dealAreaDamage(targetLoc, attacker, instantEffects, timedEffects);
			} else {
				if(target != null){
					GameCtrl.get().dealDamage(target, attacker, instantEffects, timedEffects, rotation);
				}
			}
			kill(null);
		} else {
			rotation = loc.getRotationTo(targetLoc);
		}
		// emit particles
		for(int i=0; i<particleCooldowns.length; i++){
			particleCooldowns[i] -= time;
			while(particleCooldowns[i] <= 0){
				particleCooldowns[i] += def.particleCooldowns[i];
				GameCtrl.get().addParticle(def.particleFactories[i], loc.clone(), rotation + 180f);
			}
		}
	}