Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Side by Side Diff: nacltoons/data/res/sample_game/level1.lua

Issue 12387095: [nacltoons] Use box2d sensors to detect collisions. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nacltoons/data/res/loader.lua ('k') | nacltoons/src/physics_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « nacltoons/data/res/loader.lua ('k') | nacltoons/src/physics_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698