simplify level4

This commit is contained in:
Juraj Michalek
2015-12-27 23:48:04 +01:00
parent a33751555c
commit 945b332c86
7 changed files with 127 additions and 31 deletions

View File

@@ -5,21 +5,21 @@ level4.create = function(context) {
context.finishMarker.y = 2*64;
// Add teleport
var teleport = new Kiwi.GameObjects.Sprite(context, context.textures.teleport, 4*64, 2*64);
var teleport = new Kiwi.GameObjects.Sprite(context, context.textures.teleport, 4*64, 3*64);
teleport.animation.add('idle', [ 0, 1, 2, 3 ], 0.3, true);
teleport.animation.play('idle', true);
teleport.type = 'teleport';
teleport.affectedX = 9*64;
teleport.affectedY = 2*64;
teleport.affectedX = 8*64;
teleport.affectedY = 3*64;
context.redirectorGroup.addChild(teleport);
// Add target teleport marker
var teleportTarget = new Kiwi.GameObjects.Sprite(context, context.textures.teleport, 9*64, 2*64);
var teleportTarget = new Kiwi.GameObjects.Sprite(context, context.textures.teleport, 8*64, 3*64);
teleportTarget.animation.add('idle', [ 3, 2, 1, 0 ], 0.3, true);
teleportTarget.animation.play('idle', true);
teleportTarget.type = 'teleport';
teleportTarget.affectedX = 4*64;
teleportTarget.affectedY = 2*64;
teleportTarget.affectedY = 3*64;
context.redirectorGroup.addChild(teleportTarget);
// Create redirector objects