summary refs log tree commit diff stats
path: root/res/platform.lua
diff options
context:
space:
mode:
Diffstat (limited to 'res/platform.lua')
-rw-r--r--res/platform.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/res/platform.lua b/res/platform.lua new file mode 100644 index 0000000..31a7cba --- /dev/null +++ b/res/platform.lua
@@ -0,0 +1,27 @@
1function moveLeft(entity, len, speed)
2 local remaining = len / speed
3
4 while (remaining > 0) do
5 print("no")
6 --entity:ponderable().vel:x(-speed)
7 remaining = remaining - coroutine.yield()
8 end
9end
10
11function moveRight(entity, len, speed)
12 local remaining = len / speed
13
14 while (remaining > 0) do
15 print("no2")
16 --entity:ponderable().vel:x(speed)
17 remaining = remaining - coroutine.yield()
18 end
19end
20
21function run(entity)
22 print("yes")
23 while true do
24 moveRight(entity, 90, 30)
25 moveLeft(entity, 90, 30)
26 end
27end \ No newline at end of file