Advertisement
Freack100

CoroutineManager Test Code

Jul 16th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. os.unloadAPI("CoroutineManager")
  2. os.loadAPI("CoroutineManager")
  3.  
  4. local manager = CoroutineManager.new()
  5.  
  6. local function master()
  7.     mngr = coroutine.yield("ManagerObject")
  8.     sleep(4)
  9.     mngr:pause()
  10. end
  11.  
  12. local id = manager:addCoroutine(function() while true do print("lol") sleep(1) end end)
  13. manager:setMasterRoutine(master)
  14. manager:run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement