mirror of
https://github.com/ysoftdevs/pf2016.git
synced 2026-03-21 00:29:39 +01:00
add level 12
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 830 B |
64
data/levels/level-10.json
Normal file
64
data/levels/level-10.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{ "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],
|
||||||
|
"height":6,
|
||||||
|
"name":"ground",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"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, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 41, 41, 41, 41, 41, 51, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
"height":6,
|
||||||
|
"name":"walls",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data":[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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 33, 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,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"nextobjectid":4,
|
||||||
|
"orientation":"orthogonal",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"renderorder":"right-down",
|
||||||
|
"tileheight":64,
|
||||||
|
"tilesets":[
|
||||||
|
{
|
||||||
|
"firstgid":1,
|
||||||
|
"image":"..\/images\/gfx64\/tiles.png",
|
||||||
|
"imageheight":448,
|
||||||
|
"imagewidth":640,
|
||||||
|
"margin":0,
|
||||||
|
"name":"base",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"spacing":0,
|
||||||
|
"tilecount":70,
|
||||||
|
"tileheight":64,
|
||||||
|
"tilewidth":64
|
||||||
|
}],
|
||||||
|
"tilewidth":64,
|
||||||
|
"version":1,
|
||||||
|
"width":18
|
||||||
|
}
|
||||||
64
data/levels/level-11.json
Normal file
64
data/levels/level-11.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{ "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],
|
||||||
|
"height":6,
|
||||||
|
"name":"ground",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"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, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 41, 41, 41, 41, 41, 51, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
"height":6,
|
||||||
|
"name":"walls",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data":[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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 33, 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,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"nextobjectid":4,
|
||||||
|
"orientation":"orthogonal",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"renderorder":"right-down",
|
||||||
|
"tileheight":64,
|
||||||
|
"tilesets":[
|
||||||
|
{
|
||||||
|
"firstgid":1,
|
||||||
|
"image":"..\/images\/gfx64\/tiles.png",
|
||||||
|
"imageheight":448,
|
||||||
|
"imagewidth":640,
|
||||||
|
"margin":0,
|
||||||
|
"name":"base",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"spacing":0,
|
||||||
|
"tilecount":70,
|
||||||
|
"tileheight":64,
|
||||||
|
"tilewidth":64
|
||||||
|
}],
|
||||||
|
"tilewidth":64,
|
||||||
|
"version":1,
|
||||||
|
"width":18
|
||||||
|
}
|
||||||
64
data/levels/level-12.json
Normal file
64
data/levels/level-12.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{ "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, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
|
||||||
|
"height":6,
|
||||||
|
"name":"ground",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data":[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, 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, 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, 0, 0, 0, 0, 0, 0],
|
||||||
|
"height":6,
|
||||||
|
"name":"walls",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data":[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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
"height":6,
|
||||||
|
"name":"sky",
|
||||||
|
"opacity":1,
|
||||||
|
"type":"tilelayer",
|
||||||
|
"visible":true,
|
||||||
|
"width":18,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"nextobjectid":4,
|
||||||
|
"orientation":"orthogonal",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"renderorder":"right-down",
|
||||||
|
"tileheight":64,
|
||||||
|
"tilesets":[
|
||||||
|
{
|
||||||
|
"firstgid":1,
|
||||||
|
"image":"..\/images\/gfx64\/tiles.png",
|
||||||
|
"imageheight":448,
|
||||||
|
"imagewidth":640,
|
||||||
|
"margin":0,
|
||||||
|
"name":"base",
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
"spacing":0,
|
||||||
|
"tilecount":70,
|
||||||
|
"tileheight":64,
|
||||||
|
"tilewidth":64
|
||||||
|
}],
|
||||||
|
"tilewidth":64,
|
||||||
|
"version":1,
|
||||||
|
"width":18
|
||||||
|
}
|
||||||
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
var state = new Kiwi.State('state');
|
var state = new Kiwi.State('state');
|
||||||
var levels = [level1, level2, level3, level4, level5, level6, level7, level8, level9, level10];
|
var levels = [
|
||||||
|
level1, level2, level3, level4, level5, level6, level7, level8, level9,
|
||||||
|
level10, level11, level12];
|
||||||
|
|
||||||
state.preload = function() {
|
state.preload = function() {
|
||||||
this.addJSON('level1', 'data/levels/level-01.json');
|
this.addJSON('level1', 'data/levels/level-01.json');
|
||||||
@@ -28,6 +30,8 @@ state.preload = function() {
|
|||||||
this.addJSON('level8', 'data/levels/level-08.json');
|
this.addJSON('level8', 'data/levels/level-08.json');
|
||||||
this.addJSON('level9', 'data/levels/level-09.json');
|
this.addJSON('level9', 'data/levels/level-09.json');
|
||||||
this.addJSON('level10', 'data/levels/level-10.json');
|
this.addJSON('level10', 'data/levels/level-10.json');
|
||||||
|
this.addJSON('level11', 'data/levels/level-11.json');
|
||||||
|
this.addJSON('level12', 'data/levels/level-12.json');
|
||||||
this.addSpriteSheet('base', './data/images/gfx64/tiles.png', 64, 64);
|
this.addSpriteSheet('base', './data/images/gfx64/tiles.png', 64, 64);
|
||||||
this.addSpriteSheet('character', './data/images/gfx64/marble_black.png', 80, 80 );
|
this.addSpriteSheet('character', './data/images/gfx64/marble_black.png', 80, 80 );
|
||||||
this.addSpriteSheet('oneWay', './data/images/gfx64/st_oneway.png', 64, 64 );
|
this.addSpriteSheet('oneWay', './data/images/gfx64/st_oneway.png', 64, 64 );
|
||||||
|
|||||||
@@ -38,3 +38,53 @@ function addTeleportPair(context, x, y, x2, y2) {
|
|||||||
addTeleport(context, x, y, x2, y2, true);
|
addTeleport(context, x, y, x2, y2, true);
|
||||||
addTeleport(context, x2, y2, x, y, false);
|
addTeleport(context, x2, y2, x, y, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add switch
|
||||||
|
*/
|
||||||
|
function addSwitch(context, x, y, cellIndex) {
|
||||||
|
var laserSwitch = new Kiwi.GameObjects.Sprite(context, context.textures.switch, x*64, y*64);
|
||||||
|
laserSwitch.cellIndex = cellIndex;
|
||||||
|
laserSwitch.initialCellIndex = cellIndex;
|
||||||
|
laserSwitch.type = 'switch';
|
||||||
|
context.redirectorGroup.addChild(laserSwitch);
|
||||||
|
return laserSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add laser
|
||||||
|
*/
|
||||||
|
function addLaser(context, x, y, direction, isBurning) {
|
||||||
|
var laser = new Kiwi.GameObjects.Sprite(context, context.textures.laser, x*64, y*64);
|
||||||
|
|
||||||
|
if (direction == 'up') {
|
||||||
|
laser.animation.add('idle', [ 0, 4, 8, 4 ], 0.4, true);
|
||||||
|
laser.animation.add('burning', [ 0, 4, 8, 12, 16, 20, 24, 28, 32 ], 0.2, true);
|
||||||
|
} else {
|
||||||
|
laser.animation.add('idle', [ 2, 6, 10, 6 ], 0.4, true);
|
||||||
|
laser.animation.add('burning', [ 2, 6, 10, 14, 18, 22, 26, 30, 34 ], 0.2, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBurning) {
|
||||||
|
laser.initialAnimation = 'burning';
|
||||||
|
} else {
|
||||||
|
laser.initialAnimation = 'idle';
|
||||||
|
}
|
||||||
|
laser.animation.play(laser.initialAnimation, true);
|
||||||
|
laser.type = 'laser';
|
||||||
|
context.redirectorGroup.addChild(laser);
|
||||||
|
return laser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add laser beam
|
||||||
|
*/
|
||||||
|
function addLaserBeam(context, x, y, cellIndex, isBurning) {
|
||||||
|
var laserBeam = new Kiwi.GameObjects.Sprite(context, context.textures.laserBeam, x*64, y*64);
|
||||||
|
laserBeam.cellIndex = cellIndex;
|
||||||
|
laserBeam.initialVisible = isBurning;
|
||||||
|
laserBeam.visible = isBurning;
|
||||||
|
laserBeam.type = 'laserBeam';
|
||||||
|
context.redirectorGroup.addChild(laserBeam);
|
||||||
|
return laserBeam;
|
||||||
|
}
|
||||||
@@ -147,7 +147,6 @@ level7.create = function(context) {
|
|||||||
box2.initialX = 9*64;
|
box2.initialX = 9*64;
|
||||||
box2.initialY = 3*64;
|
box2.initialY = 3*64;
|
||||||
context.redirectorGroup.addChild(box2);
|
context.redirectorGroup.addChild(box2);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var level8 = {};
|
var level8 = {};
|
||||||
@@ -162,35 +161,11 @@ level8.create = function(context) {
|
|||||||
context.finishMarker.x = 11*64;
|
context.finishMarker.x = 11*64;
|
||||||
context.finishMarker.y = 4*64;
|
context.finishMarker.y = 4*64;
|
||||||
|
|
||||||
|
|
||||||
// Laser
|
// Laser
|
||||||
var laser = new Kiwi.GameObjects.Sprite(context, context.textures.laser, 4*64, 1*64);
|
var laser = addLaser(context, 4, 1, 'down', true);
|
||||||
laser.animation.add('idle', [ 2, 6, 10, 6 ], 0.4, true);
|
var laser2 = addLaser(context, 4, 3, 'up', true);
|
||||||
laser.animation.add('burning', [ 2, 6, 10, 14, 18, 22, 26, 30, 34 ], 0.2, true);
|
var laserBeam = addLaserBeam(context, 4, 2, 1, true);
|
||||||
laser.animation.play('burning', true);
|
var laserSwitch = addSwitch(context, 2, 3, 0);
|
||||||
laser.initialAnimation = 'burning';
|
|
||||||
laser.type = 'laser';
|
|
||||||
context.redirectorGroup.addChild(laser);
|
|
||||||
|
|
||||||
var laser2 = new Kiwi.GameObjects.Sprite(context, context.textures.laser, 4*64, 3*64);
|
|
||||||
laser2.animation.add('idle', [ 0, 4, 8, 4 ], 0.4, true);
|
|
||||||
laser2.animation.add('burning', [ 0, 4, 8, 12, 16, 20, 24, 28, 32 ], 0.2, true);
|
|
||||||
laser2.animation.play('burning', true);
|
|
||||||
laser2.initialAnimation = 'burning';
|
|
||||||
laser2.type = 'laser';
|
|
||||||
context.redirectorGroup.addChild(laser2);
|
|
||||||
|
|
||||||
var laserBeam = new Kiwi.GameObjects.Sprite(context, context.textures.laserBeam, 4*64, 2*64);
|
|
||||||
laserBeam.cellIndex = 1;
|
|
||||||
laserBeam.initialVisible = true;
|
|
||||||
laserBeam.type = 'laserBeam';
|
|
||||||
context.redirectorGroup.addChild(laserBeam);
|
|
||||||
|
|
||||||
var laserSwitch = new Kiwi.GameObjects.Sprite(context, context.textures.switch, 2*64, 3*64);
|
|
||||||
laserSwitch.cellIndex = 0;
|
|
||||||
laserSwitch.initialCellIndex = 0;
|
|
||||||
laserSwitch.type = 'switch';
|
|
||||||
context.redirectorGroup.addChild(laserSwitch);
|
|
||||||
|
|
||||||
// Laser
|
// Laser
|
||||||
var laser3 = new Kiwi.GameObjects.Sprite(context, context.textures.laser, 8*64, 2*64);
|
var laser3 = new Kiwi.GameObjects.Sprite(context, context.textures.laser, 8*64, 2*64);
|
||||||
@@ -209,23 +184,11 @@ level8.create = function(context) {
|
|||||||
laser4.type = 'laser';
|
laser4.type = 'laser';
|
||||||
context.redirectorGroup.addChild(laser4);
|
context.redirectorGroup.addChild(laser4);
|
||||||
|
|
||||||
var laserBeam2 = new Kiwi.GameObjects.Sprite(context, context.textures.laserBeam, 8*64, 3*64);
|
var laserBeam2 = addLaserBeam(context, 8, 3, 1, true);
|
||||||
laserBeam2.cellIndex = 1;
|
var laserSwitch2 = addSwitch(context, 6, 3, 0);
|
||||||
laserBeam2.initialVisible=true;
|
|
||||||
laserBeam2.type = 'laserBeam';
|
|
||||||
context.redirectorGroup.addChild(laserBeam2);
|
|
||||||
|
|
||||||
var laserSwitch2 = new Kiwi.GameObjects.Sprite(context, context.textures.switch, 6*64, 3*64);
|
|
||||||
laserSwitch2.cellIndex = 0;
|
|
||||||
laserSwitch2.initialCellIndex = 0;
|
|
||||||
laserSwitch2.type = 'switch';
|
|
||||||
laserSwitch2.linkedItems = [laser3, laser4, laserBeam2];
|
laserSwitch2.linkedItems = [laser3, laser4, laserBeam2];
|
||||||
context.redirectorGroup.addChild(laserSwitch2);
|
|
||||||
|
|
||||||
var laserSwitch3 = new Kiwi.GameObjects.Sprite(context, context.textures.switch, 5*64, 3*64);
|
var laserSwitch3 = addSwitch(context, 5, 3, 0);
|
||||||
laserSwitch3.cellIndex = 0;
|
|
||||||
laserSwitch3.initialCellIndex = 0;
|
|
||||||
laserSwitch3.type = 'switch';
|
|
||||||
laserSwitch3.linkedItems = [laser, laser2, laserBeam, laserSwitch];
|
laserSwitch3.linkedItems = [laser, laser2, laserBeam, laserSwitch];
|
||||||
context.redirectorGroup.addChild(laserSwitch3);
|
context.redirectorGroup.addChild(laserSwitch3);
|
||||||
|
|
||||||
@@ -248,8 +211,6 @@ level8.create = function(context) {
|
|||||||
// Up
|
// Up
|
||||||
addRedirector(context, 10, 2, 0, -1, 3);
|
addRedirector(context, 10, 2, 0, -1, 3);
|
||||||
addRedirector(context, 9, 2, 0, -1, 3);
|
addRedirector(context, 9, 2, 0, -1, 3);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var level9 = {};
|
var level9 = {};
|
||||||
@@ -322,3 +283,79 @@ level10.create = function(context) {
|
|||||||
addRedirector(context, 8, 3, 0, 1, 6);
|
addRedirector(context, 8, 3, 0, 1, 6);
|
||||||
addRedirector(context, 8, 4, 0, 1, 6);
|
addRedirector(context, 8, 4, 0, 1, 6);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var level11 = {};
|
||||||
|
level11.create = function(context) {
|
||||||
|
// Define start coordinates
|
||||||
|
context.character.initialX = 4*64;
|
||||||
|
context.character.initialY = 4*64;
|
||||||
|
context.character.initialVelocityX = 64;
|
||||||
|
context.character.initialVelocityY = 0;
|
||||||
|
|
||||||
|
// Define finish coordinates
|
||||||
|
context.finishMarker.x = 9*64;
|
||||||
|
context.finishMarker.y = 1*64;
|
||||||
|
};
|
||||||
|
|
||||||
|
var level12 = {};
|
||||||
|
level12.create = function(context) {
|
||||||
|
// Define start coordinates
|
||||||
|
context.character.initialX = 0*64;
|
||||||
|
context.character.initialY = 5*64;
|
||||||
|
context.character.initialVelocityX = 16;
|
||||||
|
context.character.initialVelocityY = 0;
|
||||||
|
|
||||||
|
// Define finish coordinates
|
||||||
|
context.finishMarker.x = 12*64;
|
||||||
|
context.finishMarker.y = 5*64;
|
||||||
|
|
||||||
|
var laser = addLaser(context, 1, 4, 'up', false);
|
||||||
|
|
||||||
|
var laserSwitch = addSwitch(context, 1, 5, 2);
|
||||||
|
laserSwitch.linkedItems = [laser,
|
||||||
|
addLaserBeam(context, 1, 3, 1, false),
|
||||||
|
addLaserBeam(context, 1, 2, 2, false),
|
||||||
|
addLaserBeam(context, 1, 1, 1, false),
|
||||||
|
addLaserBeam(context, 1, 0, 3, false),
|
||||||
|
addLaserBeam(context, 2, 0, 4, false),
|
||||||
|
addLaserBeam(context, 2, 1, 1, false),
|
||||||
|
addLaserBeam(context, 2, 2, 5, false),
|
||||||
|
];
|
||||||
|
|
||||||
|
var laser2 = addLaser(context, 4, 4, 'up', false);
|
||||||
|
var laserSwitch2 = addSwitch(context, 4, 5, 2);
|
||||||
|
laserSwitch2.linkedItems = [laser2,
|
||||||
|
addLaserBeam(context, 4, 3, 1, false),
|
||||||
|
addLaserBeam(context, 4, 2, 2, false),
|
||||||
|
addLaserBeam(context, 4, 1, 1, false),
|
||||||
|
addLaserBeam(context, 4, 0, 3, false),
|
||||||
|
addLaserBeam(context, 5, 0, 0, false),
|
||||||
|
addLaserBeam(context, 5, 2, 0, false),
|
||||||
|
addLaserBeam(context, 6, 0, 1, false),
|
||||||
|
];
|
||||||
|
|
||||||
|
var laser3 = addLaser(context, 8, 4, 'up', false);
|
||||||
|
var laserSwitch3 = addSwitch(context, 8, 5, 2);
|
||||||
|
laserSwitch3.linkedItems = [laser3,
|
||||||
|
addLaserBeam(context, 8, 3, 1, false),
|
||||||
|
addLaserBeam(context, 8, 2, 1, false),
|
||||||
|
addLaserBeam(context, 8, 1, 6, false),
|
||||||
|
addLaserBeam(context, 8, 0, 1, false),
|
||||||
|
addLaserBeam(context, 7, 1, 0, false),
|
||||||
|
];
|
||||||
|
|
||||||
|
var laser4 = addLaser(context, 10, 4, 'up', false);
|
||||||
|
var laserSwitch4 = addSwitch(context, 10, 5, 2);
|
||||||
|
laserSwitch4.linkedItems = [laser4,
|
||||||
|
addLaserBeam(context, 10, 3, 1, false),
|
||||||
|
addLaserBeam(context, 10, 2, 2, false),
|
||||||
|
addLaserBeam(context, 10, 1, 1, false),
|
||||||
|
addLaserBeam(context, 10, 0, 3, false),
|
||||||
|
addLaserBeam(context, 11, 0, 0, false),
|
||||||
|
addLaserBeam(context, 11, 2, 0, false),
|
||||||
|
addLaserBeam(context, 11, 4, 0, false),
|
||||||
|
addLaserBeam(context, 12, 2, 4, false),
|
||||||
|
addLaserBeam(context, 12, 3, 1, false),
|
||||||
|
addLaserBeam(context, 12, 4, 5, false),
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user