The distance that the projectile travels depends on whether a target is hit. If no target will be hit, then the distance is set so the projectile goes out of view. If a target will be hit, then that target reports its distance from the weapon's center. This distance is given to the projectile and the projectile determines the total frame count it needs to reach the target. The projectile, in turn, counts frames with calls to draw itself. The projectile reports it is done traveling when its count reaches the total frame count.