public void update(int delta)
	{
		if(switchedWaypoints)
		{
			if(targetWaypoint == null) {
				//done
				finished = true;
				return;
			} else {
				//recalculate dx and dy
				float diffX, diffY;
				diffX = targetWaypoint.getX() - this.x;
				diffY = targetWaypoint.getY() - this.y;
				float magnitude = (float)Math.sqrt(diffX*diffX + diffY*diffY);
				dx = diffX / magnitude;
				dy = diffY / magnitude;
				//System.out.println("dx: " + dx + ", dy: " + dy);
				
				switchedWaypoints = false;
			}
			
		} else {	
			
			//if the enemy has reached it's next waypoint
			if(Game.circlesCollide(this.x, this.y, 1, this.targetWaypoint.getX(), this.targetWaypoint.getY(), 1))
			{
				switchedWaypoints = true;
				this.targetWaypoint = this.targetWaypoint.getNext();
				return;
			}
			
			this.x += dx * speed * (delta/1000.0);
			this.y += dy * speed * (delta/1000.0);
			
			/*
			 * Determine if we have moved out of range of any towers and alert those towers.
			 */
			
			int size = attackers.size();
			for(int i = 0; i < size; i++)
			{
				if(!Game.enemyInRange(attackers.get(i), this))
				{
					attackers.get(i).outOfRange(this);
					attackers.remove(i);
					i--;
					size--;
				}
			}
			
		}
	}