| OLD | NEW |
| 1 -- Level description file. This file describes a single level. It | 1 -- Level description file. This file describes a single level. It |
| 2 -- is desgined to be referenced from the theme descritions file. | 2 -- is desgined to be referenced from the theme descritions file. |
| 3 -- It should not pollute the global namespace and should return a | 3 -- It should not pollute the global namespace and should return a |
| 4 -- single value which is the table describing the level. | 4 -- single value which is the table describing the level. |
| 5 | 5 |
| 6 local level = { | 6 local level = { |
| 7 goal = { 34, 56 }, | 7 goal = { 700, 50 }, |
| 8 start = { 200, 250 }, | 8 start = { 100, height - 100 }, |
| 9 stars = { { 100, 100 }, { 200, 150}, { 300, 200 } }, | 9 stars = { { 200, 490 }, { 200, 250}, { 420, 100 } }, |
| 10 | 10 |
| 11 objects = { | 11 objects = { |
| 12 -- create four fixed lines in the world forming a box | 12 -- create three ramps for the ball to roll down |
| 13 { start = { 100, 100 }, finish = { 100, 200 } }, | 13 { start = { 20, 450 }, finish = { 550, 400 } }, |
| 14 { start = { 100, 200 }, finish = { 200, 200 } }, | 14 |
| 15 { start = { 200, 200 }, finish = { 200, 100 } }, | 15 { start = { 200, 200}, finish = { 780, 380 } }, |
| 16 { start = { 200, 100 }, finish = { 100, 100 } }, | 16 |
| 17 { start = { 20, 240}, finish = { 200, 50 } }, |
| 18 |
| 19 -- create a box |
| 20 { start = { 500, 200 }, finish = { 500, 300 } }, |
| 21 { start = { 500, 300 }, finish = { 600, 300 } }, |
| 22 { start = { 600, 300 }, finish = { 600, 200 } }, |
| 23 { start = { 600, 200 }, finish = { 500, 200 } }, |
| 17 | 24 |
| 18 -- create a dynamic line anchored to the world at a fixed point. | 25 -- create a dynamic line anchored to the world at a fixed point. |
| 19 { start = { 300, 100 }, finish = { 500, 100 }, type = 'dynamic', anchor =
{ 400, 100 } }, | 26 { start = { 220, 50 }, finish = { 620, 50 }, type = 'dynamic', anchor = {
420, 50 } }, |
| 20 } | 27 } |
| 21 } | 28 } |
| 22 | 29 |
| 23 return level | 30 return level |
| OLD | NEW |