Advertisement
otorp2

coroutine bug

Jan 14th, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. extends Node2D
  2.  
  3. # member variables here, example:
  4. # var a=2
  5. # var b="textvar"
  6. func coroutine():
  7. print("2-1")
  8. yield()
  9. print("2-2")
  10. yield()
  11. print("2-3")
  12. yield()
  13. print("2-4")
  14.  
  15. func _ready():
  16. print("Starting")
  17. var co = coroutine()
  18. while co.is_valid():
  19. co.resume()
  20. print("Complete")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement