Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node
- func my_looper():
- for x in 4:
- yield()
- print("I am %sx awesome" % x)
- func _ready():
- var v = my_looper()
- # Question 1: HOW WILL WE CALL ALL THE SUBROUTINES ?
- # OPTION 1!
- # v.resume()
- # v.resume()
- # v.resume() ... until all the FunctionState is empty
- # OPTION 2!
- # v.resume().resume() ... for every FunctionState returned
- # OPTION 3!
- # v.resume() .. doing it once is enough
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement