add level 11

This commit is contained in:
Juraj Michalek
2015-12-28 22:11:18 +01:00
parent 0d4fa91d18
commit d813e61ac1
2 changed files with 37 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
{ "height":6,
"layers":[
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 12, 0, 1, 0, 1, 0, 1, 11, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 11, 12, 1, 0, 1, 0, 12, 0, 0, 0, 0, 0, 0, 0, 2, 0, 12, 0, 12, 0, 1, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":6,
"name":"ground",
"opacity":1,
@@ -12,7 +12,7 @@
"y":0
},
{
"data":[0, 0, 0, 0, 41, 41, 41, 41, 41, 41, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 31, 0, 0, 0, 0, 31, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":6,
"name":"sky",
"opacity":1,

View File

@@ -287,14 +287,43 @@ level10.create = function(context) {
var level11 = {};
level11.create = function(context) {
// Define start coordinates
context.character.initialX = 4*64;
context.character.initialX = 1*64;
context.character.initialY = 4*64;
context.character.initialVelocityX = 64;
context.character.initialVelocityY = 0;
context.character.initialVelocityX = 0;
context.character.initialVelocityY = -64;
// Define finish coordinates
context.finishMarker.x = 9*64;
context.finishMarker.y = 1*64;
context.finishMarker.x = 11*64;
context.finishMarker.y = 4*64;
var laser = addLaser(context, 8, 3, 'down', false);
var laser2 = addLaser(context, 8, 5, 'up', false);
var laserSwitch = addSwitch(context, 1, 2, 2);
var laserSwitch2 = addSwitch(context, 6, 2, 2);
var laserBeam = addLaserBeam(context, 8, 4, 1, false);
laserSwitch.linkedItems = [laser, laser2, laserSwitch2, laserBeam ];
laserSwitch2.linkedItems = [laser, laser2, laserSwitch, laserBeam ];
// Right
addRedirector(context, 5, 1, 1, 0, 0);
addRedirector(context, 5, 2, 1, 0, 0);
addRedirector(context, 5, 3, 1, 0, 0);
addRedirector(context, 5, 4, 1, 0, 0);
addRedirector(context, 4, 4, 1, 0, 0);
// Up
addRedirector(context, 7, 1, 0, -1, 3);
addRedirector(context, 7, 2, 0, -1, 3);
// Down
addRedirector(context, 7, 4, 0, 1, 6);
addRedirector(context, 7, 3, 0, 1, 6);
addRedirector(context, 3, 4, 0, 1, 6);
// Left
addRedirector(context, 8, 4, 0, -1, 9);
addRedirector(context, 9, 4, 0, -1, 9);
};
var level12 = {};