Thanks for the comment! The missiles have saved the ID of the enemy to target, and they are always turning to aim at them as they fly. If the enemy is destroyed before the missile reaches it, then the ID will be invalid and the missile will travel in a straight line off the map. Finally, to keep things visually interesting, when the tower fires its missiles, it uses a random angle for each one.