void navigateMissile(Entity e, HomeMissileComponent homeMissile) { FollowTargetComponent targetComponent = e.followTarget; // The target is not alive, so go find another one. if (targetComponent.target == null || !targetComponent.target.hasGameObject) { e.AddFindTarget(homeMissile.targetCollisionType); e.RemoveFollowTarget(); return; } setMissileVelocity(e, homeMissile, targetComponent); }