Advertisement
LittleAngel

Coroutines

Sep 1st, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. void SomeMethod () {
  2. //someCode()
  3. StartCoroutine (FadeObject (currentObject));
  4. }
  5.  
  6. IEnumerator FadeObject (Object myObject) {
  7. while (SomeFadingTest) {
  8. // SomeFadingCode()
  9. yield return null;
  10. }
  11. // Put object back in the pool code
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement