summaryrefslogtreecommitdiff
path: root/lua/punch.lua
diff options
context:
space:
mode:
authorGuillermo Ramos2014-07-01 20:51:07 +0200
committerGuillermo Ramos2014-07-01 20:51:07 +0200
commitf3c354d396a38033dac28ece6f6220e75cef5aec (patch)
tree98c0977e8152472463cd2947589f725c9d5e2551 /lua/punch.lua
parentaef238a0600c5cb775bb371dbb2463fd0381bff9 (diff)
download7l-f3c354d396a38033dac28ece6f6220e75cef5aec.tar.gz
[Lua] Día 2 (sin terminar)
Diffstat (limited to 'lua/punch.lua')
-rw-r--r--lua/punch.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/punch.lua b/lua/punch.lua
new file mode 100644
index 0000000..8f8b24f
--- /dev/null
+++ b/lua/punch.lua
@@ -0,0 +1,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()