User prompt
mientras el personaje se mueve, sus brazos y piernas simulan estar corriendo ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
cuando el personaje toca una moneda se suman 10 puntos
User prompt
quieron una imagen para las monedas
User prompt
en cada nivel aparecen monedas al azar
User prompt
cuando el huevo de dragon toca al personaje, este pierde una vida
User prompt
cuando el personaje toca el huevo de dragon, este desaprece y muestra un efecto de luces grande ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
solo puede aparecer un pozo enemigo por nivel
User prompt
solo aparece un enemigo volador por nivel
User prompt
la duracion del sol es de 7 segundos en pantalla ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
el sol no se mueve, aparece de forma aleatoria cerca del centro de la pantalla ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
el sol se mueve de derecha a izquierda, su movimiento es mas rapido ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
el movimiento del sol es de derecha a izquierda, y su duracion es de 5 segundos ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
el movimiento del sol es mas lento ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
un dragon pasa volando por el cielo de derecha a izquierda, al asar suelta un huevo por nivel, el huevo mata al personaje si lo toca ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
quiero un sonido cuando el personaje toca el sol
User prompt
quiero que el sol se mueva de izquierda a derecha ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
quiero que en algunos niveles aparezca un sol por 3 segundos, cuando el personaje lo toca gana 1 vida extra. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
cuando el personaje toca el circulo, el circulo se cierra y sale fuego de este ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
a prtir del nivel 2 aprece un nuevo enemigo, es una pequeño agujero que aparece sobre el piso, si elpersonaje lo toca muere.
User prompt
elimina todos los castillos
User prompt
coloca un fondo de castillos y campos
User prompt
coloca un suelo
User prompt
la pantalla del juego es apaisada
User prompt
cuando el personaje toca la meta, de esta salen muchas luces de colores, el efecto es grande ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
cuando el personaje toca la meta, de esta salen luces de colores ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.attachAsset('enemy', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityX = 2;
self.velocityY = 0;
self.gravity = 0.8;
self.isAlive = true;
self.direction = -1; // Always move left initially
self.patrolDistance = 300;
self.startX = 0;
self.isTracking = false;
self.update = function () {
if (!self.isAlive) return;
// Apply gravity
self.velocityY += self.gravity;
// Seek player behavior
if (player) {
var distanceToPlayer = Math.abs(player.x - self.x);
var verticalDistance = Math.abs(player.y - self.y);
// Only seek if player is within detection range
if (distanceToPlayer < 400 && verticalDistance < 200) {
// Make enemy look at player and move towards them
if (player.x < self.x) {
self.direction = -1;
self.velocityX = Math.min(self.velocityX + 0.2, self.maxSpeed || 3);
} else {
self.direction = 1;
self.velocityX = Math.min(self.velocityX + 0.2, self.maxSpeed || 3);
}
// Eye tracking effect - tween enemy slightly towards player
if (!self.isTracking) {
self.isTracking = true;
var targetTint = 0xFF4444; // Red tint when tracking
tween(enemyGraphics, {
tint: targetTint
}, {
duration: 300
});
}
} else {
// Return to normal advancing behavior (move left)
if (self.isTracking) {
self.isTracking = false;
tween(enemyGraphics, {
tint: 0xFFFFFF
}, {
duration: 500
});
}
// Use the enemy's set velocity or default to 2
self.velocityX = self.velocityX || 2;
self.direction = -1; // Always move left when not tracking
}
}
// Move horizontally
self.x += self.velocityX * self.direction;
self.y += self.velocityY;
// Ground collision
if (self.y >= groundLevel - 30) {
self.y = groundLevel - 30;
self.velocityY = 0;
}
// Platform collision
for (var i = 0; i < platforms.length; i++) {
var platform = platforms[i];
if (self.intersects(platform) && self.velocityY > 0) {
var enemyBottom = self.y + 30;
var platformTop = platform.y - 20;
if (enemyBottom - self.velocityY <= platformTop) {
self.y = platformTop - 30;
self.velocityY = 0;
}
}
}
// Remove enemies that go off screen (left side)
if (self.x < -100) {
self.isAlive = false;
self.visible = false;
}
// Keep enemy in bounds (right side only)
if (self.x > 2018) {
self.x = 2018;
self.direction = -1;
}
};
self.defeat = function () {
self.isAlive = false;
self.visible = false;
LK.getSound('enemyDestroy').play();
LK.setScore(LK.getScore() + 100);
scoreTxt.setText(LK.getScore());
showCrashMessage();
};
return self;
});
var FlyingEnemy = Container.expand(function () {
var self = Container.call(this);
var flyingEnemyGraphics = self.attachAsset('flyingEnemy', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityX = 1;
self.velocityY = 1;
self.isAlive = true;
self.direction = -1;
self.verticalDirection = 1;
self.amplitude = 100;
self.startY = 0;
self.isTracking = false;
self.update = function () {
if (!self.isAlive) return;
// Vertical sine wave movement
self.y += self.velocityY * self.verticalDirection;
if (Math.abs(self.y - self.startY) > self.amplitude) {
self.verticalDirection *= -1;
}
// Seek player behavior
if (player) {
var distanceToPlayer = Math.abs(player.x - self.x);
var verticalDistance = Math.abs(player.y - self.y);
if (distanceToPlayer < 350 && verticalDistance < 250) {
if (player.x < self.x) {
self.direction = -1;
self.velocityX = Math.min(self.velocityX + 0.15, self.maxSpeed || 2.5);
} else {
self.direction = 1;
self.velocityX = Math.min(self.velocityX + 0.15, self.maxSpeed || 2.5);
}
if (!self.isTracking) {
self.isTracking = true;
var targetTint = 0xFF8844;
tween(flyingEnemyGraphics, {
tint: targetTint
}, {
duration: 300
});
}
} else {
if (self.isTracking) {
self.isTracking = false;
tween(flyingEnemyGraphics, {
tint: 0xFFFFFF
}, {
duration: 500
});
}
self.velocityX = self.velocityX || 1.5;
self.direction = -1;
}
}
// Move horizontally
self.x += self.velocityX * self.direction;
// Remove enemies that go off screen
if (self.x < -100) {
self.isAlive = false;
self.visible = false;
}
// Keep enemy in bounds (right side)
if (self.x > 2018) {
self.x = 2018;
self.direction = -1;
}
};
self.defeat = function () {
self.isAlive = false;
self.visible = false;
LK.getSound('enemyDestroy').play();
LK.setScore(LK.getScore() + 100);
scoreTxt.setText(LK.getScore());
showCrashMessage();
};
return self;
});
var Goal = Container.expand(function () {
var self = Container.call(this);
var goalGraphics = self.attachAsset('goal', {
anchorX: 0.5,
anchorY: 0.5
});
return self;
});
var Platform = Container.expand(function () {
var self = Container.call(this);
var platformGraphics = self.attachAsset('platform', {
anchorX: 0.5,
anchorY: 0.5
});
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityX = 0;
self.velocityY = 0;
self.speed = 8;
self.jumpPower = 25;
self.gravity = 0.8;
self.isGrounded = false;
self.isJumping = false;
self.update = function () {
// Apply gravity
self.velocityY += self.gravity;
// Apply velocities
self.x += self.velocityX;
self.y += self.velocityY;
// Ground collision
if (self.y >= groundLevel - 40) {
self.y = groundLevel - 40;
self.velocityY = 0;
self.isGrounded = true;
self.isJumping = false;
}
// Platform collision
for (var i = 0; i < platforms.length; i++) {
var platform = platforms[i];
if (self.intersects(platform) && self.velocityY > 0) {
var playerBottom = self.y + 40;
var platformTop = platform.y - 20;
if (playerBottom - self.velocityY <= platformTop) {
self.y = platformTop - 40;
self.velocityY = 0;
self.isGrounded = true;
self.isJumping = false;
}
}
}
// Keep player in bounds
if (self.x < 40) self.x = 40;
if (self.x > 2008) self.x = 2008;
// Apply friction
self.velocityX *= 0.85;
// Auto-movement logic
if (autoMovementEnabled && goal) {
// Calculate direction to goal
var distanceToGoal = goal.x - self.x;
var verticalDistance = goal.y - self.y;
// Move towards goal horizontally
if (Math.abs(distanceToGoal) > 50) {
if (distanceToGoal > 0) {
self.velocityX = autoMovementSpeed;
} else {
self.velocityX = -autoMovementSpeed;
}
}
// Update last position for tracking (but no auto-jump)
lastPlayerX = self.x;
}
};
self.jump = function () {
if (self.isGrounded) {
self.velocityY = -self.jumpPower;
self.isGrounded = false;
self.isJumping = true;
LK.getSound('jump').play();
}
};
self.moveLeft = function () {
self.velocityX = -self.speed;
};
self.moveRight = function () {
self.velocityX = self.speed;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB,
orientation: 'landscape'
});
/****
* Game Code
****/
var player;
var enemies = [];
var flyingEnemies = [];
var platforms = [];
var goal;
var currentLevel = 1;
var lives = 3;
var groundLevel = 2000;
var leftPressed = false;
var rightPressed = false;
var lastTouchX = 0;
var lastTouchY = 0;
// UI Elements
var scoreTxt = new Text2('Score: 0', {
size: 60,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0, 0);
scoreTxt.x = 120;
scoreTxt.y = 50;
LK.gui.topLeft.addChild(scoreTxt);
var levelTxt = new Text2('Level: 1', {
size: 60,
fill: 0xFFFFFF
});
levelTxt.anchor.set(0.5, 0);
levelTxt.x = 0;
levelTxt.y = 50;
LK.gui.top.addChild(levelTxt);
var livesTxt = new Text2('Lives: 3', {
size: 60,
fill: 0xFFFFFF
});
livesTxt.anchor.set(1, 0);
livesTxt.x = -50;
livesTxt.y = 50;
LK.gui.topRight.addChild(livesTxt);
function createLevel(levelNum) {
// Clear existing level
for (var i = enemies.length - 1; i >= 0; i--) {
enemies[i].destroy();
enemies.splice(i, 1);
}
for (var i = flyingEnemies.length - 1; i >= 0; i--) {
flyingEnemies[i].destroy();
flyingEnemies.splice(i, 1);
}
for (var i = platforms.length - 1; i >= 0; i--) {
platforms[i].destroy();
platforms.splice(i, 1);
}
if (goal) {
goal.destroy();
goal = null;
}
// Hide any existing "Bien echo" message
var existingMessage = LK.gui.center.children.find(function (child) {
return child.text === 'Bien echo';
});
if (existingMessage) {
existingMessage.destroy();
}
// Create player if not exists
if (!player) {
player = game.addChild(new Player());
}
// Reset player position
player.x = 200;
player.y = groundLevel - 100;
player.velocityX = 0;
player.velocityY = 0;
// Reset auto-movement variables
lastPlayerX = player.x;
// Create platforms based on level - different layouts for each level
var platformConfigs = [
// Level 1 - Simple staircase
[{
x: 500,
y: 1850
}, {
x: 750,
y: 1750
}, {
x: 1000,
y: 1650
}, {
x: 1250,
y: 1550
}],
// Level 2 - Zigzag pattern
[{
x: 400,
y: 1850
}, {
x: 650,
y: 1750
}, {
x: 900,
y: 1800
}, {
x: 1150,
y: 1650
}, {
x: 1400,
y: 1550
}],
// Level 3 - Dense low platforms
[{
x: 350,
y: 1800
}, {
x: 550,
y: 1700
}, {
x: 750,
y: 1850
}, {
x: 950,
y: 1650
}, {
x: 1150,
y: 1550
}, {
x: 1350,
y: 1450
}],
// Level 4 - High platforms with gaps
[{
x: 450,
y: 1800
}, {
x: 700,
y: 1700
}, {
x: 950,
y: 1850
}, {
x: 1200,
y: 1600
}],
// Level 5 - Vertical tower
[{
x: 650,
y: 1850
}, {
x: 650,
y: 1750
}, {
x: 900,
y: 1650
}, {
x: 1150,
y: 1700
}, {
x: 1400,
y: 1600
}],
// Level 6 - Scattered platforms
[{
x: 400,
y: 1800
}, {
x: 600,
y: 1700
}, {
x: 800,
y: 1850
}, {
x: 1000,
y: 1650
}, {
x: 1200,
y: 1550
}, {
x: 1400,
y: 1450
}],
// Level 7 - Long jumps
[{
x: 550,
y: 1750
}, {
x: 850,
y: 1650
}, {
x: 1150,
y: 1550
}],
// Level 8 - Complex maze
[{
x: 450,
y: 1850
}, {
x: 650,
y: 1750
}, {
x: 850,
y: 1850
}, {
x: 1050,
y: 1650
}, {
x: 1250,
y: 1800
}, {
x: 1450,
y: 1550
}],
// Level 9 - Pyramid structure
[{
x: 900,
y: 1850
}, {
x: 750,
y: 1750
}, {
x: 1050,
y: 1750
}, {
x: 600,
y: 1650
}, {
x: 1200,
y: 1650
}, {
x: 900,
y: 1550
}],
// Level 10 - Final challenge
[{
x: 350,
y: 1800
}, {
x: 550,
y: 1700
}, {
x: 750,
y: 1750
}, {
x: 950,
y: 1650
}, {
x: 1150,
y: 1700
}, {
x: 1350,
y: 1600
}, {
x: 1550,
y: 1500
}]];
var levelPlatforms = platformConfigs[Math.min(levelNum - 1, platformConfigs.length - 1)];
var _loop = function _loop() {
platform = game.addChild(new Platform());
platform.x = levelPlatforms[i].x;
platform.y = levelPlatforms[i].y;
platforms.push(platform);
// Add vertical movement to each platform
moveDistance = 150; // How far up/down to move
moveDuration = 2000 + i * 300; // Different speeds for each platform
initialY = platform.y; // Create alternating movement - some go up first, others down first
targetY = i % 2 === 0 ? initialY - moveDistance : initialY + moveDistance; // Start the movement animation
function animatePlatform(plat, startY, endY, duration) {
tween(plat, {
y: endY
}, {
duration: duration,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Reverse the movement when finished
animatePlatform(plat, endY, startY, duration);
}
});
}
animatePlatform(platform, initialY, targetY, moveDuration);
},
platform,
moveDistance,
moveDuration,
initialY,
targetY;
for (var i = 0; i < levelPlatforms.length; i++) {
_loop();
}
// Create enemies - spawn from right side
var enemyCount = levelNum + 2; // Unlimited enemy increase per level
var enemySpeed = 2 + (levelNum - 1) * 0.5; // Speed increases by 0.5 per level
for (var i = 0; i < enemyCount; i++) {
var enemy = game.addChild(new Enemy());
enemy.x = 2048 + i * 200; // Start from right side of screen
enemy.y = groundLevel - 100;
enemy.startX = enemy.x;
enemy.velocityX = enemySpeed; // Set speed based on level
enemy.maxSpeed = enemySpeed + 1; // Set max speed for tracking
enemies.push(enemy);
}
// Create flying enemies - spawn from right side at random heights
var flyingEnemyCount = Math.floor(levelNum / 2) + 1; // Flying enemies increase every 2 levels
var flyingEnemySpeed = 1.5 + (levelNum - 1) * 0.3;
for (var i = 0; i < flyingEnemyCount; i++) {
var flyingEnemy = game.addChild(new FlyingEnemy());
flyingEnemy.x = 2048 + i * 300;
// Random Y position between groundLevel - 800 and groundLevel - 200
flyingEnemy.y = groundLevel - 200 - Math.random() * 600;
flyingEnemy.startY = flyingEnemy.y;
flyingEnemy.velocityX = flyingEnemySpeed;
flyingEnemy.maxSpeed = flyingEnemySpeed + 0.5;
flyingEnemies.push(flyingEnemy);
}
// Create goal
goal = game.addChild(new Goal());
goal.x = 1900;
goal.y = groundLevel - 75;
// Update level display
levelTxt.setText('Level: ' + levelNum);
}
function nextLevel() {
currentLevel++;
LK.setScore(LK.getScore() + 500);
scoreTxt.setText(LK.getScore());
LK.getSound('levelComplete').play();
// Display "Bien echo" message
var congratsText = new Text2('Bien echo', {
size: 120,
fill: 0xFFD700
});
congratsText.anchor.set(0.5, 0.5);
congratsText.x = 0;
congratsText.y = 0;
LK.gui.center.addChild(congratsText);
// Remove the message after 2 seconds
LK.setTimeout(function () {
congratsText.destroy();
}, 2000);
if (currentLevel > 10) {
LK.showYouWin();
} else {
createLevel(currentLevel);
}
}
function showCrashMessage() {
// Remove existing crash message if any
if (crashText) {
crashText.destroy();
}
// Create crash message
crashText = new Text2('CRASHH', {
size: 100,
fill: 0xFF0000
});
crashText.anchor.set(0.5, 0.5);
crashText.x = 0;
crashText.y = 0;
LK.gui.center.addChild(crashText);
// Remove message after 1 second
LK.setTimeout(function () {
if (crashText) {
crashText.destroy();
crashText = null;
}
}, 1000);
}
function loseLife() {
lives--;
livesTxt.setText('Lives: ' + lives);
LK.getSound('playerDeath').play();
if (lives <= 0) {
LK.showGameOver();
} else {
// Reset player position
player.x = 200;
player.y = groundLevel - 100;
player.velocityX = 0;
player.velocityY = 0;
}
}
// Touch controls
game.down = function (x, y, obj) {
lastTouchX = x;
lastTouchY = y;
// Jump on tap
if (player) {
player.jump();
}
};
game.move = function (x, y, obj) {
if (!player) return;
var deltaX = x - lastTouchX;
// Movement based on drag direction
if (Math.abs(deltaX) > 20) {
if (deltaX > 0) {
rightPressed = true;
leftPressed = false;
} else {
leftPressed = true;
rightPressed = false;
}
}
lastTouchX = x;
lastTouchY = y;
};
game.up = function (x, y, obj) {
leftPressed = false;
rightPressed = false;
};
game.update = function () {
if (!player) return;
// Handle movement (only if auto-movement is disabled)
if (!autoMovementEnabled) {
if (leftPressed) {
player.moveLeft();
}
if (rightPressed) {
player.moveRight();
}
}
// Enemy collision detection
for (var i = 0; i < enemies.length; i++) {
var enemy = enemies[i];
if (!enemy.isAlive) continue;
if (player.intersects(enemy)) {
// Check if player is falling on enemy from above
if (player.velocityY > 0 && player.y < enemy.y - 10) {
enemy.defeat();
player.velocityY = -10; // Bounce effect
} else {
// Player touched enemy from side - player dies
loseLife();
}
}
}
// Flying enemy collision detection
for (var i = 0; i < flyingEnemies.length; i++) {
var flyingEnemy = flyingEnemies[i];
if (!flyingEnemy.isAlive) continue;
if (player.intersects(flyingEnemy)) {
// Check if player is falling on flying enemy from above
if (player.velocityY > 0 && player.y < flyingEnemy.y - 10) {
flyingEnemy.defeat();
player.velocityY = -12; // Stronger bounce effect
} else {
// Player touched flying enemy from side - push player back
var pushDirection = player.x < flyingEnemy.x ? -1 : 1;
var pushForce = 200;
player.velocityX = pushDirection * 8; // Push player horizontally
player.velocityY = -5; // Small upward push
// Play sound effect
LK.getSound('flyingEnemyHit').play();
// Add visual feedback with tween
tween(player, {
x: player.x + pushDirection * pushForce
}, {
duration: 300,
easing: tween.easeOut
});
}
}
}
// Goal collision
if (goal && player.intersects(goal)) {
// Create colored lights effect - big spectacular display
for (var j = 0; j < 30; j++) {
var light = LK.getAsset('centerCircle', {
width: 40 + Math.random() * 30,
height: 40 + Math.random() * 30,
anchorX: 0.5,
anchorY: 0.5,
x: goal.x,
y: goal.y,
tint: [0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF, 0xFF8000, 0x8000FF, 0x00FF80][j % 10]
});
game.addChild(light);
// Calculate random direction for each light with more spread
var angle = j / 30 * Math.PI * 2 + Math.random() * 1.0;
var distance = 300 + Math.random() * 200;
var targetX = goal.x + Math.cos(angle) * distance;
var targetY = goal.y + Math.sin(angle) * distance;
// Animate light outward with fade and rotation
tween(light, {
x: targetX,
y: targetY,
alpha: 0,
scaleX: 0.1,
scaleY: 0.1,
rotation: Math.random() * Math.PI * 4
}, {
duration: 1200 + Math.random() * 800,
easing: tween.easeOut,
onFinish: function onFinish() {
light.destroy();
}
});
}
nextLevel();
}
// Fall off screen
if (player.y > 2200) {
loseLife();
}
};
// Auto-movement variables
var autoMovementEnabled = true;
var autoMovementSpeed = 4;
var lastPlayerX = 0;
// Crash message variable
var crashText;
// Initialize first level
createLevel(1);
; ===================================================================
--- original.js
+++ change.js
@@ -280,9 +280,10 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x87CEEB
+ backgroundColor: 0x87CEEB,
+ orientation: 'landscape'
});
/****
* Game Code
@@ -293,9 +294,9 @@
var platforms = [];
var goal;
var currentLevel = 1;
var lives = 3;
-var groundLevel = 2600;
+var groundLevel = 2000;
var leftPressed = false;
var rightPressed = false;
var lastTouchX = 0;
var lastTouchY = 0;
@@ -364,180 +365,180 @@
var platformConfigs = [
// Level 1 - Simple staircase
[{
x: 500,
- y: 2450
+ y: 1850
}, {
x: 750,
- y: 2350
+ y: 1750
}, {
x: 1000,
- y: 2250
+ y: 1650
}, {
x: 1250,
- y: 2150
+ y: 1550
}],
// Level 2 - Zigzag pattern
[{
x: 400,
- y: 2450
+ y: 1850
}, {
x: 650,
- y: 2350
+ y: 1750
}, {
x: 900,
- y: 2400
+ y: 1800
}, {
x: 1150,
- y: 2250
+ y: 1650
}, {
x: 1400,
- y: 2150
+ y: 1550
}],
// Level 3 - Dense low platforms
[{
x: 350,
- y: 2400
+ y: 1800
}, {
x: 550,
- y: 2300
+ y: 1700
}, {
x: 750,
- y: 2450
+ y: 1850
}, {
x: 950,
- y: 2250
+ y: 1650
}, {
x: 1150,
- y: 2150
+ y: 1550
}, {
x: 1350,
- y: 2050
+ y: 1450
}],
// Level 4 - High platforms with gaps
[{
x: 450,
- y: 2400
+ y: 1800
}, {
x: 700,
- y: 2300
+ y: 1700
}, {
x: 950,
- y: 2450
+ y: 1850
}, {
x: 1200,
- y: 2200
+ y: 1600
}],
// Level 5 - Vertical tower
[{
x: 650,
- y: 2450
+ y: 1850
}, {
x: 650,
- y: 2350
+ y: 1750
}, {
x: 900,
- y: 2250
+ y: 1650
}, {
x: 1150,
- y: 2300
+ y: 1700
}, {
x: 1400,
- y: 2200
+ y: 1600
}],
// Level 6 - Scattered platforms
[{
x: 400,
- y: 2400
+ y: 1800
}, {
x: 600,
- y: 2300
+ y: 1700
}, {
x: 800,
- y: 2450
+ y: 1850
}, {
x: 1000,
- y: 2250
+ y: 1650
}, {
x: 1200,
- y: 2150
+ y: 1550
}, {
x: 1400,
- y: 2050
+ y: 1450
}],
// Level 7 - Long jumps
[{
x: 550,
- y: 2350
+ y: 1750
}, {
x: 850,
- y: 2250
+ y: 1650
}, {
x: 1150,
- y: 2150
+ y: 1550
}],
// Level 8 - Complex maze
[{
x: 450,
- y: 2450
+ y: 1850
}, {
x: 650,
- y: 2350
+ y: 1750
}, {
x: 850,
- y: 2450
+ y: 1850
}, {
x: 1050,
- y: 2250
+ y: 1650
}, {
x: 1250,
- y: 2400
+ y: 1800
}, {
x: 1450,
- y: 2150
+ y: 1550
}],
// Level 9 - Pyramid structure
[{
x: 900,
- y: 2450
+ y: 1850
}, {
x: 750,
- y: 2350
+ y: 1750
}, {
x: 1050,
- y: 2350
+ y: 1750
}, {
x: 600,
- y: 2250
+ y: 1650
}, {
x: 1200,
- y: 2250
+ y: 1650
}, {
x: 900,
- y: 2150
+ y: 1550
}],
// Level 10 - Final challenge
[{
x: 350,
- y: 2400
+ y: 1800
}, {
x: 550,
- y: 2300
+ y: 1700
}, {
x: 750,
- y: 2350
+ y: 1750
}, {
x: 950,
- y: 2250
+ y: 1650
}, {
x: 1150,
- y: 2300
+ y: 1700
}, {
x: 1350,
- y: 2200
+ y: 1600
}, {
x: 1550,
- y: 2100
+ y: 1500
}]];
var levelPlatforms = platformConfigs[Math.min(levelNum - 1, platformConfigs.length - 1)];
var _loop = function _loop() {
platform = game.addChild(new Platform());
@@ -782,9 +783,9 @@
}
nextLevel();
}
// Fall off screen
- if (player.y > 2800) {
+ if (player.y > 2200) {
loseLife();
}
};
// Auto-movement variables
un fuego. In-Game asset. 2d. High contrast. No shadows. un fuego. un fuego
un fuego con ojos y boca, de expresion enojado. In-Game asset. 2d. High contrast. No shadows
un castillo simple. In-Game asset. 2d. High contrast. No shadows. castillo simple
una nube. In-Game asset. 2d. High contrast. No shadows
fuego con alas, ojo y boca. In-Game asset. 2d. High contrast. No shadows
camino de tierra. In-Game asset. 2d. High contrast. No shadows
cielo con castillos y nubes de fondo, que se vea borroso. In-Game asset. 2d. High contrast. No shadows
un oyo de tierra con estacas puntiagudas, de aspecto amenazador. In-Game asset. 2d. High contrast. No shadows
un sol con la leyenda "1 UP". In-Game asset. 2d. High contrast. No shadows
un huevo de colores. In-Game asset. 2d. High contrast. No shadows. un huevo de colores
humo gris. In-Game asset. 2d. High contrast. No shadows
un muñeco con gorra y pantalones. In-Game asset. 2d. High contrast. No shadows