Created
December 18, 2012 05:25
-
-
Save anonymous/4325303 to your computer and use it in GitHub Desktop.
pause your game in unity
This file contains hidden or 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
def _Sleep(duration as single) as IEnumerator: | |
while duration > 0.0F: | |
unless pause: | |
duration -= Time.deltaTime | |
yield | |
def Sleep(duration as single) as Coroutine: | |
return StartCoroutine(_Sleep(1.0F)) | |
def _Sleep() as IEnumerator: | |
while Temp.Fpause or Temp.FeventWait: | |
yield | |
def Sleep() as Coroutine: | |
return StartCoroutine(_Sleep()) | |
#ex | |
yield Sleep(1.0F) | |
yield Sleep() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment