Advertisement
Guest User

Untitled

a guest
Apr 10th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. -- 第一种写法
  2. function fun1()
  3.    print("fun1")
  4. end
  5. function fun2()
  6.     print("fun2")
  7. end
  8. dog1 = hs.location.new(fun1)
  9. dog1.start()
  10. dog2 = hs.location.new(fun2)
  11. dog2.start()
  12.  
  13. -- 第二种写法
  14. function fun1()
  15.     print("fun1")
  16. end
  17. function fun2()
  18.     print("fun2")
  19. end
  20. function fun3()
  21.     fun1()
  22.     fun2()
  23. end
  24. dog = hs.location.new(fun3)
  25. dog.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement