An example of behaviour pattern with a dummy server
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
356 B

  1. function run_event(name)
  2. print("run " .. name)
  3. if(name == "archivist") then
  4. Business.fetch_add(10)
  5. elseif(name == "reset") then
  6. Business.fetch_add(-Business.fetch_add(0))
  7. else
  8. Business.fetch_add(1)
  9. end
  10. end
  11. function display_event(name)
  12. print("display " .. name)
  13. return tostring(Business.fetch_add(0))
  14. end