Skip to content

Instantly share code, notes, and snippets.

@tapuo
Forked from anonymous/pause.boo
Created December 18, 2012 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tapuo/4325620 to your computer and use it in GitHub Desktop.
Save tapuo/4325620 to your computer and use it in GitHub Desktop.
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(duration))
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