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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nacltoons/data/res/loader.lua ('k') | nacltoons/src/physics_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nacltoons/data/res/sample_game/level1.lua
diff --git a/nacltoons/data/res/sample_game/level1.lua b/nacltoons/data/res/sample_game/level1.lua
index fbee9ba71e7db869209ff060a0ed050fc82971f8..25112acc5f2d1c08fb7e0ff4f8f344460a3d3a04 100644
--- a/nacltoons/data/res/sample_game/level1.lua
+++ b/nacltoons/data/res/sample_game/level1.lua
@@ -4,19 +4,26 @@
-- single value which is the table describing the level.
local level = {
- goal = { 34, 56 },
- start = { 200, 250 },
- stars = { { 100, 100 }, { 200, 150}, { 300, 200 } },
+ goal = { 700, 50 },
+ start = { 100, height - 100 },
+ stars = { { 200, 490 }, { 200, 250}, { 420, 100 } },
objects = {
- -- create four fixed lines in the world forming a box
- { start = { 100, 100 }, finish = { 100, 200 } },
- { start = { 100, 200 }, finish = { 200, 200 } },
- { start = { 200, 200 }, finish = { 200, 100 } },
- { start = { 200, 100 }, finish = { 100, 100 } },
+ -- create three ramps for the ball to roll down
+ { start = { 20, 450 }, finish = { 550, 400 } },
+
+ { start = { 200, 200}, finish = { 780, 380 } },
+
+ { start = { 20, 240}, finish = { 200, 50 } },
+
+ -- create a box
+ { start = { 500, 200 }, finish = { 500, 300 } },
+ { start = { 500, 300 }, finish = { 600, 300 } },
+ { start = { 600, 300 }, finish = { 600, 200 } },
+ { start = { 600, 200 }, finish = { 500, 200 } },
-- create a dynamic line anchored to the world at a fixed point.
- { start = { 300, 100 }, finish = { 500, 100 }, type = 'dynamic', anchor = { 400, 100 } },
+ { start = { 220, 50 }, finish = { 620, 50 }, type = 'dynamic', anchor = { 420, 50 } },
}
}
« 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