@Override
	public void update() {
		if (temporary) {
			killTime--;
			if (killTime <= 0 && !hasDec) {  // abt is never null if the tower is temporary
				hasDec = true;
				abt.dec();
			}
		}
		
		
		if (!isReloading()) {
			Mob closestMob;
			if (mode == 1) // closest to tower
				   closestMob = mh.nearestMob(loc, range*TDPanel.speedFactor * TDPanel.towerFactor);
				else if (mode == 2) { // closest to source
				   closestMob = mh.closeSource(loc, range*TDPanel.speedFactor * TDPanel.towerFactor);
				}
				else // closest to end
					closestMob = mh.closeEnd(loc, range*TDPanel.speedFactor * TDPanel.towerFactor);
			if (closestMob != null) {
				lastShot = System.nanoTime()/1000000;
				if (lastShot % 2 == 1) // The first bullet is what causes the ship to navigate!
					bh.add(new FlyerBullet(loc, closestMob.getLoc(), splash, dmg,3*vels[upg],System.nanoTime(), bulletTime, true, this));

				bh.add(new FlyerBullet((Point2D.Double)loc.clone(), closestMob.getLoc(), splash, dmg,5*vels[upg],System.nanoTime(), bulletTime, false, this));
				bh.add(new FlyerBullet((Point2D.Double)loc.clone(), closestMob.getLoc(), splash, dmg,8*vels[upg],System.nanoTime(), bulletTime, false, this));
				lastMove = 0;
				return;
			}
			
				lastMove++;
		}
		else if (lastMove > 400) { // this destucks the flier if it gets stuck!
			bh.add(new FlyerBullet(loc, TDPanel.getSource(), splash, dmg,vels[upg],System.nanoTime(), bulletTime, false, this));
			bh.add(new FlyerBullet((Point2D.Double)loc.clone(), TDPanel.getSource(), splash, dmg,5*vels[upg],System.nanoTime(), bulletTime, false, this));
			lastMove = 0; 
		}
	}