User prompt
quiero que muevas el imagenLabel al final del menu principal
User prompt
Quiero que deslplazes el imagenLabel un poco hacia abajo
User prompt
añade una nueva seccion con su propio asset que diga imagen en el menu principal, esta nueva seccion debe estar despues del baloncesto,
User prompt
porfa necesito que el asset que está debajo de la seccion de baloncesto tenga su propio asset por separado bajo el nombre de ́ ́imagen ́ ́
User prompt
Añade un asset mas en el menu principal , el asset debe estar debajo de la seccion de baloncesto.
User prompt
Please fix the bug: 'ReferenceError: shotCounterDisplay is not defined' in or related to this line: 'shotCounterDisplay.setText(basketballShotCount + '/10');' Line Number: 828
User prompt
Please fix the bug: 'ReferenceError: shotCounterDisplay is not defined' in or related to this line: 'shotCounterDisplay.setText(basketballShotCount + '/10');' Line Number: 827
User prompt
Please fix the bug: 'TypeError: gameUI.getChildByName is not a function' in or related to this line: 'var shotCounterDisplay = gameUI.getChildByName('shotCounterDisplay');' Line Number: 827
User prompt
añade un contador en el minijuedo de baloncesto, el contador debe llegar a 10 en relacion a los tiros que se hace con el balon de basquete en el minijuedo de baloncesto
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'setText')' in or related to this line: 'backMenuButton.buttonText.setText('Volver al Menú');' Line Number: 423
User prompt
quiero que me permitas modificar los titulos de los minijuegos del menu principal a traves de su propio asset
User prompt
quiero que el menu principal tenga su propio asset, uno para el titulo de mini juesgos olimpicos, otro asset para el apartado de altletismo, otro asset para el apartado de natación y otro asset para el apartado de baloncesto.
User prompt
añade algunos obstaculos en el minijuego de natacion ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
“Añade esto: cambia únicamente la imagen de fondo del minijuego de atletismo por una imagen de una cancha de atletismo. No modifiques nada más del código, solo reemplaza la imagen del fondo.”
User prompt
añade pelotas de futbol, basketball y tenis moviendos horizontalmente de fondo en el menu principal ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Corrige esto: Mejora el menú principal. Quiero que se vea más bonito, con un fondo más profesional (degradado o imagen suave), botones redondeados con sombra, animaciones ligeras, texto con una fuente más elegante y colores más modernos. Mantén las funciones iguales, pero haz que el menú se vea más moderno y limpio. No cambies la lógica, solo el diseño visual.” ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
añade esto: cambia el fondo del minijuego de baloncesto a uno de una cancha de basquet
User prompt
añade esto: en el minijuego de baloncesto quiero que añadas un contador que cada que se realize un aro vaya aumentando de uno en uno, al llegar el contador a 10 tiros salga la palabra YOU WIN y termina el juego, regresando a el menu principal. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
corrige esto: quiero el balon pase por el aro de baloncesto, es decir que al momento de entar descienda, haciendo de esto un efecto de entrada y salida. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
corrige esto: quiero que el balon al momento de llegar al aro se vea mas pequeño al momento de entrar al aro de baloncesto. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
corrige esto: en el minijuego de baloncesto al realizar el tiro quiero que la pelota haga un movimieno de arriba hacia abajo, haciendo de este una animacion de tiro ascendente y cuando llegue al aro descendente. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
corrige esto> quiero que modifiques el nombre de tiro libre a baloncesto
User prompt
**“Quiero organizar mis tres minijuegos de esta manera: Minijuego de atletismo: el jugador avanza dando clicks rápidos con el ratón. Minijuego de natación: el jugador avanza moviendo el ratón de izquierda a derecha o haciendo círculos sencillos. Reemplazar el minijuego de ciclismo por un minijuego simple de tiro libre de baloncesto. Para el minijuego de tiro libre quiero esto: El jugador toca o hace click en la pelota. Arrastra hacia arriba para elegir fuerza y dirección. Suelta para lanzar la pelota. Si la pelota entra en el aro, el nivel termina. Después de terminar, debe volver al menú principal. Además, quiero un botón en la pantalla que diga ‘Volver al menú’, y que al tocarlo vaya al menú principal. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addEventListener')' in or related to this line: 'document.addEventListener('keydown', function (e) {' Line Number: 513
User prompt
porfavor : devuelve como estaba antes , olvida la accion anterior que te dije
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var BasketballShooter = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('basketball', {
anchorX: 0.5,
anchorY: 0.5
});
self.startX = 1024;
self.startY = 2200;
self.x = self.startX;
self.y = self.startY;
self.isDragging = false;
self.dragStartX = 0;
self.dragStartY = 0;
self.velocityX = 0;
self.velocityY = 0;
self.isFlying = false;
self.gravity = 0.5;
self.hasScored = false;
self.update = function () {
if (self.isFlying) {
if (self.y > 2400) {
self.isFlying = false;
tween.stop(self);
self.x = self.startX;
self.y = self.startY;
self.velocityX = 0;
self.velocityY = 0;
}
}
};
self.startDrag = function (x, y) {
self.isDragging = true;
self.dragStartX = x;
self.dragStartY = y;
};
self.endDrag = function (x, y) {
if (self.isDragging) {
self.isDragging = false;
self.isFlying = true;
var dragStrengthX = (self.dragStartX - x) * 0.15;
var dragStrengthY = (self.dragStartY - y) * 0.15;
var peakY = self.y - Math.abs(dragStrengthY) * 1.5;
var targetX = self.x + dragStrengthX * 8;
var hoopY = 500;
var passThrooughY = 700;
var arcDuration = 1000;
tween(self, {
x: targetX,
y: peakY,
scaleX: 1,
scaleY: 1
}, {
duration: arcDuration * 0.4,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
x: targetX,
y: hoopY,
scaleX: 0.5,
scaleY: 0.5
}, {
duration: arcDuration * 0.3,
easing: tween.easeIn,
onFinish: function onFinishHoop() {
tween(self, {
x: targetX,
y: passThrooughY,
scaleX: 0.3,
scaleY: 0.3
}, {
duration: arcDuration * 0.3,
easing: tween.easeIn
});
}
});
}
});
}
};
return self;
});
var CyclingPlayer = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('playerCycling', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 300;
self.y = 1000;
self.speed = 0;
self.maxSpeed = 20;
self.acceleration = 1.2;
self.deceleration = 0.02;
self.lastKeyPressed = '';
self.trackOffset = 0;
self.update = function () {
if (self.speed > 0) {
self.speed -= self.deceleration;
if (self.speed < 0) {
self.speed = 0;
}
}
self.trackOffset += self.speed;
};
self.pedalA = function () {
if (self.lastKeyPressed !== 'A') {
if (self.speed < self.maxSpeed) {
self.speed += self.acceleration;
}
self.lastKeyPressed = 'A';
}
};
self.pedalD = function () {
if (self.lastKeyPressed !== 'D') {
if (self.speed < self.maxSpeed) {
self.speed += self.acceleration;
}
self.lastKeyPressed = 'D';
}
};
return self;
});
var JavelinThrower = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('playerJavelin', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 200;
self.y = 2200;
self.angle = 45;
self.thrown = false;
self.throwDistance = 150;
self.update = function () {};
self.throwJavelin = function () {
self.thrown = true;
return self.throwDistance;
};
return self;
});
var MenuButton = Container.expand(function () {
var self = Container.call(this);
var buttonBg = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
buttonBg.width = 420;
buttonBg.height = 120;
buttonBg.tint = 0x3498db;
buttonBg.alpha = 0.9;
self.buttonLabel = null;
self.setButtonLabel = function (assetId) {
if (self.buttonLabel) {
self.removeChild(self.buttonLabel);
}
self.buttonLabel = self.attachAsset(assetId, {
anchorX: 0.5,
anchorY: 0.5
});
};
self.callback = null;
self.isHovered = false;
self.originalScale = 1;
self.down = function (x, y, obj) {
tween(self, {
scaleX: 0.95,
scaleY: 0.95
}, {
duration: 150,
easing: tween.easeOut
});
if (self.callback) {
var callbackTimeout = LK.setTimeout(function () {
self.callback();
}, 150);
}
};
self.move = function (x, y, obj) {
if (!self.isHovered) {
self.isHovered = true;
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 200,
easing: tween.easeOut
});
buttonBg.tint = 0x2980b9;
}
};
self.up = function (x, y, obj) {
if (self.isHovered) {
self.isHovered = false;
tween(self, {
scaleX: 1,
scaleY: 1
}, {
duration: 200,
easing: tween.easeOut
});
buttonBg.tint = 0x3498db;
}
};
return self;
});
var SprintPlayer = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('playerSprint', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 0;
self.maxSpeed = 15;
self.acceleration = 0.5;
self.x = 200;
self.y = 400;
self.update = function () {
self.x += self.speed;
if (self.speed > 0) {
self.speed *= 0.98;
}
};
self.accelerate = function () {
if (self.speed < self.maxSpeed) {
self.speed += self.acceleration;
}
};
return self;
});
var Swimmer = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('playerSwim', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 200;
self.y = 1366;
self.normalSpeed = 4;
self.boostedSpeed = 8;
self.currentSpeed = self.normalSpeed;
self.isBoosting = false;
self.boostDuration = 0;
self.maxBoostDuration = 20;
self.minY = 1100;
self.maxY = 1600;
self.update = function () {
self.x += self.currentSpeed;
if (self.isBoosting) {
self.boostDuration--;
if (self.boostDuration <= 0) {
self.isBoosting = false;
self.currentSpeed = self.normalSpeed;
}
}
self.y = Math.max(self.minY, Math.min(self.maxY, self.y));
};
self.startBoost = function () {
self.isBoosting = true;
self.boostDuration = self.maxBoostDuration;
self.currentSpeed = self.boostedSpeed;
};
return self;
});
var ThrownJavelin = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('javelin', {
anchorX: 0.5,
anchorY: 0.5
});
self.startX = 200;
self.startY = 2200;
self.x = self.startX;
self.y = self.startY;
self.distance = 0;
self.maxDistance = 200;
self.speed = 12;
self.angle = 45;
self.verticalVelocity = 0;
self.gravity = 0.3;
self.landed = false;
self.hasShownResult = false;
self.rotation = 0;
self.update = function () {
if (!self.landed) {
var angleRad = self.angle * Math.PI / 180;
self.x += Math.cos(angleRad) * self.speed;
self.y -= Math.sin(angleRad) * self.speed - self.verticalVelocity;
self.verticalVelocity -= self.gravity;
self.distance = Math.sqrt(Math.pow(self.x - self.startX, 2) + Math.pow(self.y - self.startY, 2));
self.rotation = angleRad;
if (self.y >= 2200 || self.distance > self.maxDistance) {
self.landed = true;
self.y = 2200;
self.distance = Math.abs(self.x - self.startX);
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
var currentEvent = 0;
var eventComplete = false;
var events = ['sprint', 'swimming', 'basketball'];
var keysPressed = {};
var scores = {
sprint: 0,
swimming: 0,
basketball: 0
};
var basketballShotCount = 0;
var eventTimes = {
sprint: 0,
swimming: 0
};
var eventDistances = {
javelin: 0,
basketball: 0
};
var sprintPlayer = null;
var swimmer = null;
var javelinThrower = null;
var thrownJavelin = null;
var basketballShooter = null;
var leftZoneActive = false;
var rightZoneActive = false;
var gameUI = new Container();
gameUI.visible = false;
game.addChild(gameUI);
var gameState = 'menu';
var menuContainer = new Container();
menuContainer.visible = true;
game.addChild(menuContainer);
var eventTitle = new Text2('Sprint Event', {
size: 120,
fill: '#000000'
});
eventTitle.anchor.set(0.5, 0);
eventTitle.x = 1024;
eventTitle.y = 100;
LK.gui.top.addChild(eventTitle);
var scoreDisplay = new Text2('Distance: 0m', {
size: 100,
fill: '#000000'
});
scoreDisplay.anchor.set(0.5, 0);
scoreDisplay.x = 1024;
scoreDisplay.y = 250;
LK.gui.top.addChild(scoreDisplay);
var instructionText = new Text2('Tap rapidly to sprint!', {
size: 80,
fill: '#333333'
});
instructionText.anchor.set(0.5, 0.5);
instructionText.x = 1024;
instructionText.y = 1366;
LK.gui.center.addChild(instructionText);
var resultMessage = new Text2('', {
size: 100,
fill: '#27ae60'
});
resultMessage.anchor.set(0.5, 0.5);
resultMessage.x = 1024;
resultMessage.y = 1366;
LK.gui.center.addChild(resultMessage);
var retryButton = new MenuButton();
retryButton.x = 1024;
retryButton.y = 1700;
retryButton.visible = false;
LK.gui.bottom.addChild(retryButton);
var backMenuButton = new MenuButton();
backMenuButton.x = 1024;
backMenuButton.y = 2600;
backMenuButton.setButtonLabel('player');
backMenuButton.callback = function () {
showMainMenu();
};
LK.gui.bottom.addChild(backMenuButton);
function initSprintEvent() {
gameUI.removeChildren();
eventComplete = false;
eventTimes.sprint = 0;
backMenuButton.visible = true;
var ground = gameUI.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 1
}));
ground.x = 0;
ground.y = 800;
var finishLine = gameUI.addChild(LK.getAsset('finishLine', {
anchorX: 1,
anchorY: 1
}));
finishLine.x = 2048;
finishLine.y = 800;
sprintPlayer = gameUI.addChild(new SprintPlayer());
sprintPlayer.y = 650;
eventTitle.setText('Sprint Event - 100m Dash');
instructionText.setText('Tap to accelerate!');
scoreDisplay.setText('Distance: 0m');
}
function initSwimmingEvent() {
gameUI.removeChildren();
eventComplete = false;
eventTimes.swimming = 0;
backMenuButton.visible = true;
var waterZone = gameUI.addChild(LK.getAsset('waterZone', {
anchorX: 0,
anchorY: 0
}));
waterZone.x = 0;
waterZone.y = 1000;
var finishLine = gameUI.addChild(LK.getAsset('finishLine', {
anchorX: 1,
anchorY: 1
}));
finishLine.x = 2048;
finishLine.y = 1600;
swimmer = gameUI.addChild(new Swimmer());
eventTitle.setText('Swimming Event - Pool Sprint');
instructionText.setText('Move mouse left/right to swim!');
scoreDisplay.setText('Distance: 0m');
}
function initBasketballEvent() {
gameUI.removeChildren();
eventComplete = false;
backMenuButton.visible = true;
basketballShotCount = 0;
var courtBackground = gameUI.addChild(LK.getAsset('leftZone', {
anchorX: 0,
anchorY: 0
}));
courtBackground.x = 0;
courtBackground.y = 0;
courtBackground.width = 2048;
courtBackground.height = 2732;
var backboard = gameUI.addChild(LK.getAsset('backboard', {
anchorX: 0.5,
anchorY: 0
}));
backboard.x = 1024;
backboard.y = 200;
backboard.width = 300;
backboard.height = 400;
var hoop = gameUI.addChild(LK.getAsset('hoop', {
anchorX: 0.5,
anchorY: 0.5
}));
hoop.x = 1024;
hoop.y = 500;
basketballShooter = gameUI.addChild(new BasketballShooter());
eventTitle.setText('Basketball - Free Throw');
instructionText.setText('Drag the ball up to shoot! Release to throw!');
scoreDisplay.setText('Shots: 0/10');
var shotCounterDisplay = new Text2('0/10', {
size: 200,
fill: '#ffffff'
});
shotCounterDisplay.anchor.set(0.5, 0.5);
shotCounterDisplay.x = 1024;
shotCounterDisplay.y = 1366;
gameUI.addChild(shotCounterDisplay);
window.shotCounterDisplay = shotCounterDisplay;
}
function completeEvent() {
eventComplete = true;
instructionText.setText('Event Complete! Returning to menu...');
var nextEventTimeout = LK.setTimeout(function () {
currentEvent++;
if (currentEvent >= events.length) {
showMainMenu();
} else {
showMainMenu();
}
}, 2000);
}
function showMainMenu() {
gameState = 'menu';
backMenuButton.visible = false;
menuContainer.visible = true;
gameUI.visible = false;
menuContainer.removeChildren();
gameUI.removeChildren();
var gradientBg = menuContainer.addChild(LK.getAsset('player', {
anchorX: 0,
anchorY: 0,
width: 2048,
height: 2732
}));
gradientBg.tint = 0x1a237e;
gradientBg.x = 0;
gradientBg.y = 0;
// Add animated balls in background
var ballsContainer = menuContainer.addChild(new Container());
ballsContainer.alpha = 0.3;
// Soccer ball
var soccerBall = ballsContainer.addChild(LK.getAsset('ball', {
anchorX: 0.5,
anchorY: 0.5
}));
soccerBall.x = -200;
soccerBall.y = 400;
soccerBall.scaleX = 0.4;
soccerBall.scaleY = 0.4;
tween(soccerBall, {
x: 2248
}, {
duration: 8000,
easing: tween.linear,
onFinish: function onFinish() {
soccerBall.x = -200;
tween(soccerBall, {
x: 2248
}, {
duration: 8000,
easing: tween.linear,
onFinish: function onFinish() {
tween(soccerBall, {
x: 2248
}, {
duration: 8000,
easing: tween.linear
});
}
});
}
});
// Basketball
var bgBasketball = ballsContainer.addChild(LK.getAsset('basketball', {
anchorX: 0.5,
anchorY: 0.5
}));
bgBasketball.x = 2248;
bgBasketball.y = 1000;
bgBasketball.scaleX = 0.3;
bgBasketball.scaleY = 0.3;
tween(bgBasketball, {
x: -200
}, {
duration: 10000,
easing: tween.linear,
onFinish: function onFinish() {
bgBasketball.x = 2248;
tween(bgBasketball, {
x: -200
}, {
duration: 10000,
easing: tween.linear,
onFinish: function onFinish() {
tween(bgBasketball, {
x: -200
}, {
duration: 10000,
easing: tween.linear
});
}
});
}
});
// Tennis ball
var tennisBall = ballsContainer.addChild(LK.getAsset('ball', {
anchorX: 0.5,
anchorY: 0.5
}));
tennisBall.x = -150;
tennisBall.y = 1600;
tennisBall.scaleX = 0.25;
tennisBall.scaleY = 0.25;
tennisBall.tint = 0xccff00;
tween(tennisBall, {
x: 2198
}, {
duration: 9000,
easing: tween.linear,
onFinish: function onFinish() {
tennisBall.x = -150;
tween(tennisBall, {
x: 2198
}, {
duration: 9000,
easing: tween.linear,
onFinish: function onFinish() {
tween(tennisBall, {
x: 2198
}, {
duration: 9000,
easing: tween.linear
});
}
});
}
});
var menuTitle = menuContainer.addChild(LK.getAsset('menuTitle', {
anchorX: 0.5,
anchorY: 0.5
}));
menuTitle.x = 1024;
menuTitle.y = 500;
menuTitle.alpha = 0;
var menuTitleText = new Text2('Mini Juegos Olímpicos', {
size: 150,
fill: '#ffffff'
});
menuTitleText.anchor.set(0.5, 0.5);
menuTitle.addChild(menuTitleText);
tween(menuTitle, {
alpha: 1,
y: 550
}, {
duration: 600,
easing: tween.easeOut
});
var sprintButton = menuContainer.addChild(new MenuButton());
sprintButton.x = 1024;
sprintButton.y = 1000;
sprintButton.alpha = 0;
sprintButton.scaleX = 0.8;
sprintButton.scaleY = 0.8;
sprintButton.setButtonLabel('atletismoLabel');
sprintButton.callback = function () {
currentEvent = 0;
gameState = 'playing';
startNextEvent();
};
tween(sprintButton, {
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 500,
easing: tween.easeOut,
delay: 100
});
var swimmingButton = menuContainer.addChild(new MenuButton());
swimmingButton.x = 1024;
swimmingButton.y = 1300;
swimmingButton.alpha = 0;
swimmingButton.scaleX = 0.8;
swimmingButton.scaleY = 0.8;
swimmingButton.setButtonLabel('natacionLabel');
swimmingButton.callback = function () {
currentEvent = 1;
gameState = 'playing';
startNextEvent();
};
tween(swimmingButton, {
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 500,
easing: tween.easeOut,
delay: 200
});
var basketballButton = menuContainer.addChild(new MenuButton());
basketballButton.x = 1024;
basketballButton.y = 1600;
basketballButton.alpha = 0;
basketballButton.scaleX = 0.8;
basketballButton.scaleY = 0.8;
basketballButton.setButtonLabel('baloncestoLabel');
basketballButton.callback = function () {
currentEvent = 2;
gameState = 'playing';
startNextEvent();
};
tween(basketballButton, {
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 500,
easing: tween.easeOut,
delay: 300
});
}
function startNextEvent() {
menuContainer.visible = false;
gameUI.visible = true;
if (currentEvent === 0) {
initSprintEvent();
} else if (currentEvent === 1) {
initSwimmingEvent();
} else if (currentEvent === 2) {
initBasketballEvent();
}
}
game.down = function (x, y, obj) {
if (gameState === 'menu') return;
if (eventComplete) return;
if (currentEvent === 0) {
if (sprintPlayer) {
sprintPlayer.accelerate();
LK.getSound('sprint').play();
}
} else if (currentEvent === 1) {
if (swimmer) {
swimmer.startBoost();
LK.getSound('swim').play();
}
} else if (currentEvent === 2) {
if (basketballShooter) {
basketballShooter.startDrag(x, y);
}
}
};
game.move = function (x, y, obj) {
if (gameState === 'menu') return;
if (eventComplete) return;
if (currentEvent === 1) {
if (swimmer) {
swimmer.y = y;
}
} else if (currentEvent === 2) {
if (basketballShooter && basketballShooter.isDragging) {
basketballShooter.x = Math.max(800, Math.min(1248, x));
basketballShooter.y = Math.max(1500, Math.min(2200, y));
}
}
};
game.up = function (x, y, obj) {
if (gameState === 'menu') return;
if (eventComplete) return;
if (currentEvent === 2) {
if (basketballShooter) {
basketballShooter.endDrag(x, y);
LK.getSound('basketball').play();
}
}
};
game.update = function () {
if (gameState === 'menu') return;
if (eventComplete) return;
if (currentEvent === 0) {
if (sprintPlayer) {
sprintPlayer.update();
var distance = Math.round((sprintPlayer.x - 200) / 16);
scoreDisplay.setText('Distance: ' + distance + 'm');
if (sprintPlayer.x >= 1800) {
eventTimes.sprint = LK.ticks;
completeEvent();
}
}
} else if (currentEvent === 1) {
if (swimmer) {
swimmer.update();
var distance = Math.round((swimmer.x - 200) / 16);
scoreDisplay.setText('Distance: ' + distance + 'm');
if (swimmer.x >= 1800) {
eventTimes.swimming = LK.ticks;
completeEvent();
}
}
} else if (currentEvent === 2) {
if (basketballShooter) {
basketballShooter.update();
if (basketballShooter.isFlying && !basketballShooter.hasScored) {
var hoop = game.getChildAt(game.children.length - 1);
if (basketballShooter.intersects(hoop)) {
basketballShooter.hasScored = true;
basketballShotCount++;
scoreDisplay.setText('Shots: ' + basketballShotCount + '/10');
shotCounterDisplay.setText(basketballShotCount + '/10');
LK.effects.flashScreen(0x00ff00, 500);
if (basketballShotCount >= 10) {
var winTimeout = LK.setTimeout(function () {
LK.showYouWin();
}, 1000);
} else {
var scoreTimeout = LK.setTimeout(function () {
basketballShooter.hasScored = false;
basketballShooter.x = basketballShooter.startX;
basketballShooter.y = basketballShooter.startY;
basketballShooter.isFlying = false;
tween.stop(basketballShooter);
}, 1000);
}
}
}
}
}
};
showMainMenu();
LK.playMusic('bgmusic'); ===================================================================
--- original.js
+++ change.js
@@ -477,8 +477,9 @@
shotCounterDisplay.anchor.set(0.5, 0.5);
shotCounterDisplay.x = 1024;
shotCounterDisplay.y = 1366;
gameUI.addChild(shotCounterDisplay);
+ window.shotCounterDisplay = shotCounterDisplay;
}
function completeEvent() {
eventComplete = true;
instructionText.setText('Event Complete! Returning to menu...');
una pelota de basketball. In-Game asset. 2d. High contrast. No shadows
“Necesito una pista de atletismo en vista lateral 2D. Debe tener carriles rojos con líneas blancas. Debe ser larga, horizontal y ocupar todo el ancho. No quiero público ni edificios, solo la pista. El estilo debe ser simple para un videojuego 2D.”. In-Game asset. 2d. High contrast. No shadows
fondo de una cancha de baloncesto animada. In-Game asset. 2d. High contrast. No shadows
make a animated guy swimming. In-Game asset. 2d. High contrast. No shadows
quiero que hagas un titulo en 2d que diga mini juegos olimpicos, la tipografia me gustaria tipo mario bros. In-Game asset. 2d. High contrast. No shadows
quiero que hagas un titulo 2d que diga atletismo, con tipografia estilo mario bros. In-Game asset. 2d. High contrast. No shadows
quiero que hagas un titulo 2d que diga natación, con tipografia estilo mario bros. In-Game asset. 2d. High contrast. No shadows
quiero que hagas un titulo 2d que diga baloncesto, con tipografia estilo mario bros. In-Game asset. 2d. High contrast. No shadows
has un fondo de agua animada con algunos objetos como flotadores. In-Game asset. 2d. High contrast. No shadows
has personajes animados estilo arcade en un ambiente de juesgo olimpicos. In-Game asset. 2d. High contrast. No shadows
quiero que hagas un personaje animado que este nadando. In-Game asset. 2d. High contrast. No shadows