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