IEnumerator Move() { while (true) { move = gpsManager.Moving(); if (move) { GPSupdate(); } yield return(new WaitForSeconds(10f)); } }