summaryrefslogtreecommitdiff
path: root/lua/punch.lua
blob: 8f8b24f98827b35e759f281f5d7417a79bc8a24d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dofile("scheduler.lua")

function punch()
   for i = 1, 5 do
      print('punch ' .. i)
      wait(1.0)
   end
end

function block()
   for i = 1, 3 do
      print('block ' .. i)
      wait(2.0)
   end
end

schedule(0.0, coroutine.create(punch))
schedule(0.0, coroutine.create(block))

run()