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