Last active
July 27, 2016 22:56
-
-
Save trentrand/17a38558f0adfe5cb4e73349dac2c176 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() { | |
StartCoroutine(resetPositionOnInterval()); | |
} | |
IEnumerator resetPositionOnInterval() { | |
yield return new WaitForSeconds(5.0f); | |
// Reset position, then wait another 5 seconds | |
transform.position = initialPosition; | |
StartCoroutine(resetPositionOnInterval()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment