diff options
-rw-r--r-- | res/platform.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/res/platform.lua b/res/platform.lua index 31a7cba..5200e22 100644 --- a/res/platform.lua +++ b/res/platform.lua | |||
@@ -2,8 +2,7 @@ function moveLeft(entity, len, speed) | |||
2 | local remaining = len / speed | 2 | local remaining = len / speed |
3 | 3 | ||
4 | while (remaining > 0) do | 4 | while (remaining > 0) do |
5 | print("no") | 5 | entity:ponderable().vel.x = -speed |
6 | --entity:ponderable().vel:x(-speed) | ||
7 | remaining = remaining - coroutine.yield() | 6 | remaining = remaining - coroutine.yield() |
8 | end | 7 | end |
9 | end | 8 | end |
@@ -12,14 +11,12 @@ function moveRight(entity, len, speed) | |||
12 | local remaining = len / speed | 11 | local remaining = len / speed |
13 | 12 | ||
14 | while (remaining > 0) do | 13 | while (remaining > 0) do |
15 | print("no2") | 14 | entity:ponderable().vel.x = speed |
16 | --entity:ponderable().vel:x(speed) | ||
17 | remaining = remaining - coroutine.yield() | 15 | remaining = remaining - coroutine.yield() |
18 | end | 16 | end |
19 | end | 17 | end |
20 | 18 | ||
21 | function run(entity) | 19 | function run(entity) |
22 | print("yes") | ||
23 | while true do | 20 | while true do |
24 | moveRight(entity, 90, 30) | 21 | moveRight(entity, 90, 30) |
25 | moveLeft(entity, 90, 30) | 22 | moveLeft(entity, 90, 30) |