diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/platform.lua | 24 |
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 @@ | |||
1 | function 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 | ||
8 | end | ||
9 | |||
10 | function 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 | ||
17 | end | ||
18 | |||
19 | function run(entity) | ||
20 | while true do | ||
21 | moveRight(entity, 90, 30) | ||
22 | moveLeft(entity, 90, 30) | ||
23 | end | ||
24 | end \ No newline at end of file | ||