| Index: nacltoons/data/res/sample_game/level1.def
|
| diff --git a/nacltoons/data/res/sample_game/level1.def b/nacltoons/data/res/sample_game/level1.def
|
| index cdc12352c5ddaa10113f591f549a4ff1d5f2a51e..085fd5da566c079379b29f451a314b678a42fc93 100644
|
| --- a/nacltoons/data/res/sample_game/level1.def
|
| +++ b/nacltoons/data/res/sample_game/level1.def
|
| @@ -6,14 +6,14 @@
|
|
|
| num_stars: 3
|
|
|
| -sprites:
|
| - - { pos: [ 100, 500 ], image: ball_image, script: ball.lua, tag: BALL }
|
| - - { pos: [ 700, 40 ], image: goal_image, tag: GOAL, sensor: true }
|
| - - { pos: [ 200, 480 ], image: star_image, tag: STAR1, sensor: true }
|
| - - { pos: [ 200, 240 ], image: star_image, tag: STAR2, sensor: true }
|
| - - { pos: [ 420, 90 ], image: star_image, tag: STAR3, sensor: true }
|
| -
|
| shapes:
|
| + # Create sprites
|
| + - { type: image, dynamic: true, pos: [ 100, 500 ], image: ball_image, script: ball.lua, tag: BALL }
|
| + - { type: image, pos: [ 700, 40 ], image: goal_image, tag: GOAL, sensor: true }
|
| + - { type: image, pos: [ 200, 480 ], image: star_image, tag: STAR1, sensor: true }
|
| + - { type: image, pos: [ 200, 240 ], image: star_image, tag: STAR2, sensor: true }
|
| + - { type: image, pos: [ 420, 90 ], image: star_image, tag: STAR3, sensor: true }
|
| +
|
| # create three ramps for the ball to roll down
|
| - { type: line, color: [ 50, 230, 0 ], start: [ 20, 450 ], finish: [ 550, 400 ] }
|
|
|
| @@ -21,11 +21,16 @@ shapes:
|
|
|
| - { type: line, color: [ 0, 50, 230 ], start: [ 20, 240 ], finish: [ 200, 50 ] }
|
|
|
| - # create a box
|
| - - { type: line, start: [ 500, 200 ], finish: [ 500, 300 ] }
|
| - - { type: line, start: [ 500, 300 ], finish: [ 600, 300 ] }
|
| - - { type: line, start: [ 600, 300 ], finish: [ 600, 200 ] }
|
| - - { type: line, start: [ 600, 200 ], finish: [ 500, 200 ] }
|
| + # Create a box made of 4 lines.
|
| + - { type: compound, pos: [ 500, 200 ],
|
| + children: [
|
| + { type: line, start: [ 0, 0 ], finish: [ 0, 100 ] },
|
| + { type: line, start: [ 0, 100 ], finish: [ 100, 100 ] },
|
| + { type: line, start: [ 100, 100 ], finish: [ 100, 0 ] },
|
| + { type: line, start: [ 100, 0 ], finish: [ 0, 0 ] },
|
| + { type: image, pos: [ 50, 50 ], image: star_image }
|
| + ]
|
| + }
|
|
|
| # create a dynamic line anchored to the world at a fixed point.
|
| - { type: line, start: [ 220, 50 ], finish: [ 620, 50 ], dynamic: true, anchor: [ 420, 50 ] }
|
|
|