/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Banana = Container.expand(function (x, y) {
var self = Container.call(this);
var bananaGraphics = self.attachAsset('banana', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed;
self.lastX = self.x;
// Bananas no longer rotate
self.update = function () {
self.lastX = self.x;
self.x -= self.speed;
// Remove banana when it goes off screen
if (self.x < -50) {
self.destroy();
for (var i = 0; i < bananas.length; i++) {
if (bananas[i] === self) {
bananas.splice(i, 1);
break;
}
}
}
};
return self;
});
var Cloud = Container.expand(function (x, y) {
var self = Container.call(this);
var cloudGraphics = self.attachAsset('cloud', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed * 0.3; // Clouds move slower than obstacles
cloudGraphics.alpha = 0.7;
self.update = function () {
self.x -= self.speed;
// Remove cloud when it goes off screen and recycle
if (self.x < cameraOffsetX - 100) {
self.x = cameraOffsetX + 2148; // Reset to right side of camera view
}
};
return self;
});
var Dinosaur = Container.expand(function () {
var self = Container.call(this);
var dinoGraphics = self.attachAsset('dinosaur', {
anchorX: 0.5,
anchorY: 1
});
self.x = 300;
self.y = GROUND_Y;
self.velocityY = 0;
self.velocityX = 0;
self.onGround = true;
self.jumpPower = -25;
self.gravity = 1.2;
self.isJumping = false;
self.lastOnGround = true;
self.jump = function () {
if (self.onGround) {
self.velocityY = self.jumpPower;
self.onGround = false;
self.isJumping = true;
LK.getSound('jump').play();
// Animate dinosaur jumping with scale effect
tween(dinoGraphics, {
scaleY: 1.2,
scaleX: 0.9,
rotation: -0.1
}, {
duration: 200,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(dinoGraphics, {
scaleY: 1,
scaleX: 1,
rotation: 0
}, {
duration: 300,
easing: tween.easeIn
});
}
});
}
};
self.update = function () {
// Track last ground state
self.lastOnGround = self.onGround;
// Apply gravity
if (!self.onGround) {
self.velocityY += self.gravity;
}
// Apply forward movement
self.velocityX = gameSpeed * 0.5; // Move forward at half game speed
self.x += self.velocityX;
// Dinosaur moves infinitely forward - no boundary constraints
// Apply velocity
self.y += self.velocityY;
// Ground collision
if (self.y >= GROUND_Y) {
self.y = GROUND_Y;
self.velocityY = 0;
self.onGround = true;
self.isJumping = false;
}
// Landing animation trigger
if (!self.lastOnGround && self.onGround) {
// Just landed
tween(dinoGraphics, {
scaleX: 1.1,
scaleY: 0.9
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(dinoGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 100,
easing: tween.easeIn
});
}
});
}
};
return self;
});
var GroundBanana = Container.expand(function (x, y) {
var self = Container.call(this);
var bananaGraphics = self.attachAsset('banana', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speedX = gameSpeed;
self.speedY = -gameSpeed * 0.8; // Move upward
self.lastX = self.x;
// Ground bananas no longer rotate
self.update = function () {
self.lastX = self.x;
self.x -= self.speedX;
self.y += self.speedY; // Move upward
// Remove banana when it goes off screen (either left or top)
if (self.x < -50 || self.y < -50) {
self.destroy();
for (var i = 0; i < bananas.length; i++) {
if (bananas[i] === self) {
bananas.splice(i, 1);
break;
}
}
}
};
return self;
});
var GroundTile = Container.expand(function (x) {
var self = Container.call(this);
var groundGraphics = self.attachAsset('ground', {
anchorX: 0,
anchorY: 0
});
self.x = x;
self.y = GROUND_Y;
self.width = 2048; // Width of ground tile
self.update = function () {
// Remove and recycle ground tile when it goes off screen
if (self.x < cameraOffsetX - self.width) {
self.x = cameraOffsetX + self.width * 2; // Move to right side
}
};
return self;
});
var Meteorite = Container.expand(function (x, y) {
var self = Container.call(this);
var meteoriteGraphics = self.attachAsset('meteorite', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed * 1.5; // Meteorites move faster than bananas
self.lastX = self.x;
// Add rotation to meteorite for visual effect
self.rotationSpeed = 0.1;
self.update = function () {
self.lastX = self.x;
self.x -= self.speed;
meteoriteGraphics.rotation += self.rotationSpeed;
// Remove meteorite when it goes off screen
if (self.x < -50) {
self.destroy();
for (var i = 0; i < meteorites.length; i++) {
if (meteorites[i] === self) {
meteorites.splice(i, 1);
break;
}
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xf5f5dc
});
/****
* Game Code
****/
var GROUND_Y = 2200; // Ground level
var gameSpeed = 8; // Game speed
var spawnTimer = 0;
var gameScore = 0;
var isGameRunning = true;
var dinosaur;
var bananas = [];
var clouds = [];
var meteorites = [];
var groundTiles = [];
var speedIncrease = 0;
var cameraOffsetX = 0; // Camera offset to follow dinosaur
var speedBoostTimer = 0; // Timer for 10-second speed boosts
var meteoriteTimer = 0; // Timer for meteorite spawning every 5 seconds
// Create multiple ground tiles for infinite scrolling
for (var i = 0; i < 3; i++) {
var groundTile = new GroundTile(i * 2048);
game.addChild(groundTile);
groundTiles.push(groundTile);
}
// Initialize dinosaur
dinosaur = new Dinosaur();
game.addChild(dinosaur);
// Create background clouds
for (var i = 0; i < 6; i++) {
var cloud = new Cloud(Math.random() * 2048 + 200, Math.random() * 400 + 200);
game.addChild(cloud);
clouds.push(cloud);
}
// Score display
var scoreText = new Text2('Score: 0', {
size: 48,
fill: 0x666666
});
scoreText.anchor.set(0, 0);
scoreText.x = 50;
scoreText.y = 50;
LK.gui.topLeft.addChild(scoreText);
// High score display
var highScore = storage.highScore || 0;
var highScoreText = new Text2('High: ' + highScore, {
size: 36,
fill: 0x999999
});
highScoreText.anchor.set(0, 0);
highScoreText.x = 50;
highScoreText.y = 110;
LK.gui.topLeft.addChild(highScoreText);
function spawnBanana() {
// Random choice between flying bananas and ground bananas
if (Math.random() < 0.5) {
// Flying bananas at dinosaur height, spawn ahead of camera
var bananaHeight = dinosaur.y; // Spawn at dinosaur's current height
var banana = new Banana(cameraOffsetX + 2048 + 50, bananaHeight);
game.addChild(banana);
bananas.push(banana);
} else {
// Ground bananas coming from below, spawn ahead of camera
var banana = new GroundBanana(cameraOffsetX + 2048 + 50, GROUND_Y + 50);
game.addChild(banana);
bananas.push(banana);
}
}
function spawnMeteorite() {
// Spawn meteorite at dinosaur's head height (slightly above the dinosaur)
var meteoriteHeight = dinosaur.y - 40; // 40 pixels above dinosaur's center
var meteorite = new Meteorite(cameraOffsetX + 2048 + 50, meteoriteHeight);
game.addChild(meteorite);
meteorites.push(meteorite);
}
function checkCollisions() {
for (var i = 0; i < bananas.length; i++) {
var banana = bananas[i];
if (dinosaur.intersects(banana)) {
// Game over
LK.getSound('hit').play();
LK.effects.flashScreen(0xFF0000, 500);
isGameRunning = false;
// Save high score
if (gameScore > highScore) {
storage.highScore = gameScore;
}
// Show custom message before game over
showCustomGameOverMessage();
return;
}
}
// Check meteorite collisions
for (var i = 0; i < meteorites.length; i++) {
var meteorite = meteorites[i];
if (dinosaur.intersects(meteorite)) {
// Game over
LK.getSound('hit').play();
LK.effects.flashScreen(0xFF0000, 500);
isGameRunning = false;
// Save high score
if (gameScore > highScore) {
storage.highScore = gameScore;
}
// Show custom message before game over
showCustomGameOverMessage();
return;
}
}
}
function updateScore() {
if (isGameRunning) {
gameScore += 1;
scoreText.setText('Score: ' + gameScore);
}
}
// Touch/tap to jump
game.down = function (x, y, obj) {
if (isGameRunning) {
dinosaur.jump();
}
};
game.update = function () {
if (!isGameRunning) return;
// Update camera to follow dinosaur
cameraOffsetX = dinosaur.x - 400; // Keep dinosaur 400px from left edge
game.x = -cameraOffsetX;
// Increase speed every 10 seconds (600 frames = 10 seconds at 60fps)
speedBoostTimer++;
if (speedBoostTimer >= 600) {
speedBoostTimer = 0;
speedIncrease += 4; // Double the speed increase every 10 seconds
var newSpeed = 8 + speedIncrease;
// Animate speed increase with tween for smooth transition
tween(window, {
gameSpeed: newSpeed
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Update all existing banana speeds after tween completes
for (var i = 0; i < bananas.length; i++) {
if (bananas[i].speed !== undefined) {
bananas[i].speed = gameSpeed;
}
if (bananas[i].speedX !== undefined) {
bananas[i].speedX = gameSpeed;
bananas[i].speedY = -gameSpeed * 0.8;
}
}
// Update all existing meteorite speeds after tween completes
for (var i = 0; i < meteorites.length; i++) {
if (meteorites[i].speed !== undefined) {
meteorites[i].speed = gameSpeed * 1.5;
}
}
}
});
// Visual feedback for speed boost
LK.effects.flashScreen(0x00FF00, 300);
}
// Update score
updateScore();
// Spawn bananas
spawnTimer++;
var spawnRate = Math.max(80 - Math.floor(gameScore / 100) * 5, 40); // Spawn rate increases with score
if (spawnTimer >= spawnRate) {
spawnBanana();
spawnTimer = 0;
}
// Spawn meteorites every 5 seconds (300 frames = 5 seconds at 60fps)
meteoriteTimer++;
if (meteoriteTimer >= 300) {
spawnMeteorite();
meteoriteTimer = 0;
}
// Update clouds
for (var i = 0; i < clouds.length; i++) {
clouds[i].speed = (gameSpeed + speedIncrease) * 0.3;
}
// Check collisions
checkCollisions();
// Clean up off-screen bananas
for (var i = bananas.length - 1; i >= 0; i--) {
if (bananas[i].x < -100 + cameraOffsetX) {
bananas[i].destroy();
bananas.splice(i, 1);
}
}
// Clean up off-screen meteorites
for (var i = meteorites.length - 1; i >= 0; i--) {
if (meteorites[i].x < -100 + cameraOffsetX) {
meteorites[i].destroy();
meteorites.splice(i, 1);
}
}
};
function showCustomGameOverMessage() {
// Create custom game over message
var gameOverMessage = new Text2('¡Suerte pa la próxima bot!', {
size: 64,
fill: 0xFF4444
});
gameOverMessage.anchor.set(0.5, 0.5);
gameOverMessage.x = 1024; // Center of screen
gameOverMessage.y = 1366; // Center of screen
gameOverMessage.alpha = 0; // Start invisible
gameOverMessage.scaleX = 0.5;
gameOverMessage.scaleY = 0.5;
LK.gui.center.addChild(gameOverMessage);
// Animate message appearance
tween(gameOverMessage, {
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
// Wait a bit then show official game over
LK.setTimeout(function () {
LK.showGameOver();
}, 1500);
}
});
} /****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Banana = Container.expand(function (x, y) {
var self = Container.call(this);
var bananaGraphics = self.attachAsset('banana', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed;
self.lastX = self.x;
// Bananas no longer rotate
self.update = function () {
self.lastX = self.x;
self.x -= self.speed;
// Remove banana when it goes off screen
if (self.x < -50) {
self.destroy();
for (var i = 0; i < bananas.length; i++) {
if (bananas[i] === self) {
bananas.splice(i, 1);
break;
}
}
}
};
return self;
});
var Cloud = Container.expand(function (x, y) {
var self = Container.call(this);
var cloudGraphics = self.attachAsset('cloud', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed * 0.3; // Clouds move slower than obstacles
cloudGraphics.alpha = 0.7;
self.update = function () {
self.x -= self.speed;
// Remove cloud when it goes off screen and recycle
if (self.x < cameraOffsetX - 100) {
self.x = cameraOffsetX + 2148; // Reset to right side of camera view
}
};
return self;
});
var Dinosaur = Container.expand(function () {
var self = Container.call(this);
var dinoGraphics = self.attachAsset('dinosaur', {
anchorX: 0.5,
anchorY: 1
});
self.x = 300;
self.y = GROUND_Y;
self.velocityY = 0;
self.velocityX = 0;
self.onGround = true;
self.jumpPower = -25;
self.gravity = 1.2;
self.isJumping = false;
self.lastOnGround = true;
self.jump = function () {
if (self.onGround) {
self.velocityY = self.jumpPower;
self.onGround = false;
self.isJumping = true;
LK.getSound('jump').play();
// Animate dinosaur jumping with scale effect
tween(dinoGraphics, {
scaleY: 1.2,
scaleX: 0.9,
rotation: -0.1
}, {
duration: 200,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(dinoGraphics, {
scaleY: 1,
scaleX: 1,
rotation: 0
}, {
duration: 300,
easing: tween.easeIn
});
}
});
}
};
self.update = function () {
// Track last ground state
self.lastOnGround = self.onGround;
// Apply gravity
if (!self.onGround) {
self.velocityY += self.gravity;
}
// Apply forward movement
self.velocityX = gameSpeed * 0.5; // Move forward at half game speed
self.x += self.velocityX;
// Dinosaur moves infinitely forward - no boundary constraints
// Apply velocity
self.y += self.velocityY;
// Ground collision
if (self.y >= GROUND_Y) {
self.y = GROUND_Y;
self.velocityY = 0;
self.onGround = true;
self.isJumping = false;
}
// Landing animation trigger
if (!self.lastOnGround && self.onGround) {
// Just landed
tween(dinoGraphics, {
scaleX: 1.1,
scaleY: 0.9
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(dinoGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 100,
easing: tween.easeIn
});
}
});
}
};
return self;
});
var GroundBanana = Container.expand(function (x, y) {
var self = Container.call(this);
var bananaGraphics = self.attachAsset('banana', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speedX = gameSpeed;
self.speedY = -gameSpeed * 0.8; // Move upward
self.lastX = self.x;
// Ground bananas no longer rotate
self.update = function () {
self.lastX = self.x;
self.x -= self.speedX;
self.y += self.speedY; // Move upward
// Remove banana when it goes off screen (either left or top)
if (self.x < -50 || self.y < -50) {
self.destroy();
for (var i = 0; i < bananas.length; i++) {
if (bananas[i] === self) {
bananas.splice(i, 1);
break;
}
}
}
};
return self;
});
var GroundTile = Container.expand(function (x) {
var self = Container.call(this);
var groundGraphics = self.attachAsset('ground', {
anchorX: 0,
anchorY: 0
});
self.x = x;
self.y = GROUND_Y;
self.width = 2048; // Width of ground tile
self.update = function () {
// Remove and recycle ground tile when it goes off screen
if (self.x < cameraOffsetX - self.width) {
self.x = cameraOffsetX + self.width * 2; // Move to right side
}
};
return self;
});
var Meteorite = Container.expand(function (x, y) {
var self = Container.call(this);
var meteoriteGraphics = self.attachAsset('meteorite', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = x;
self.y = y;
self.speed = gameSpeed * 1.5; // Meteorites move faster than bananas
self.lastX = self.x;
// Add rotation to meteorite for visual effect
self.rotationSpeed = 0.1;
self.update = function () {
self.lastX = self.x;
self.x -= self.speed;
meteoriteGraphics.rotation += self.rotationSpeed;
// Remove meteorite when it goes off screen
if (self.x < -50) {
self.destroy();
for (var i = 0; i < meteorites.length; i++) {
if (meteorites[i] === self) {
meteorites.splice(i, 1);
break;
}
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xf5f5dc
});
/****
* Game Code
****/
var GROUND_Y = 2200; // Ground level
var gameSpeed = 8; // Game speed
var spawnTimer = 0;
var gameScore = 0;
var isGameRunning = true;
var dinosaur;
var bananas = [];
var clouds = [];
var meteorites = [];
var groundTiles = [];
var speedIncrease = 0;
var cameraOffsetX = 0; // Camera offset to follow dinosaur
var speedBoostTimer = 0; // Timer for 10-second speed boosts
var meteoriteTimer = 0; // Timer for meteorite spawning every 5 seconds
// Create multiple ground tiles for infinite scrolling
for (var i = 0; i < 3; i++) {
var groundTile = new GroundTile(i * 2048);
game.addChild(groundTile);
groundTiles.push(groundTile);
}
// Initialize dinosaur
dinosaur = new Dinosaur();
game.addChild(dinosaur);
// Create background clouds
for (var i = 0; i < 6; i++) {
var cloud = new Cloud(Math.random() * 2048 + 200, Math.random() * 400 + 200);
game.addChild(cloud);
clouds.push(cloud);
}
// Score display
var scoreText = new Text2('Score: 0', {
size: 48,
fill: 0x666666
});
scoreText.anchor.set(0, 0);
scoreText.x = 50;
scoreText.y = 50;
LK.gui.topLeft.addChild(scoreText);
// High score display
var highScore = storage.highScore || 0;
var highScoreText = new Text2('High: ' + highScore, {
size: 36,
fill: 0x999999
});
highScoreText.anchor.set(0, 0);
highScoreText.x = 50;
highScoreText.y = 110;
LK.gui.topLeft.addChild(highScoreText);
function spawnBanana() {
// Random choice between flying bananas and ground bananas
if (Math.random() < 0.5) {
// Flying bananas at dinosaur height, spawn ahead of camera
var bananaHeight = dinosaur.y; // Spawn at dinosaur's current height
var banana = new Banana(cameraOffsetX + 2048 + 50, bananaHeight);
game.addChild(banana);
bananas.push(banana);
} else {
// Ground bananas coming from below, spawn ahead of camera
var banana = new GroundBanana(cameraOffsetX + 2048 + 50, GROUND_Y + 50);
game.addChild(banana);
bananas.push(banana);
}
}
function spawnMeteorite() {
// Spawn meteorite at dinosaur's head height (slightly above the dinosaur)
var meteoriteHeight = dinosaur.y - 40; // 40 pixels above dinosaur's center
var meteorite = new Meteorite(cameraOffsetX + 2048 + 50, meteoriteHeight);
game.addChild(meteorite);
meteorites.push(meteorite);
}
function checkCollisions() {
for (var i = 0; i < bananas.length; i++) {
var banana = bananas[i];
if (dinosaur.intersects(banana)) {
// Game over
LK.getSound('hit').play();
LK.effects.flashScreen(0xFF0000, 500);
isGameRunning = false;
// Save high score
if (gameScore > highScore) {
storage.highScore = gameScore;
}
// Show custom message before game over
showCustomGameOverMessage();
return;
}
}
// Check meteorite collisions
for (var i = 0; i < meteorites.length; i++) {
var meteorite = meteorites[i];
if (dinosaur.intersects(meteorite)) {
// Game over
LK.getSound('hit').play();
LK.effects.flashScreen(0xFF0000, 500);
isGameRunning = false;
// Save high score
if (gameScore > highScore) {
storage.highScore = gameScore;
}
// Show custom message before game over
showCustomGameOverMessage();
return;
}
}
}
function updateScore() {
if (isGameRunning) {
gameScore += 1;
scoreText.setText('Score: ' + gameScore);
}
}
// Touch/tap to jump
game.down = function (x, y, obj) {
if (isGameRunning) {
dinosaur.jump();
}
};
game.update = function () {
if (!isGameRunning) return;
// Update camera to follow dinosaur
cameraOffsetX = dinosaur.x - 400; // Keep dinosaur 400px from left edge
game.x = -cameraOffsetX;
// Increase speed every 10 seconds (600 frames = 10 seconds at 60fps)
speedBoostTimer++;
if (speedBoostTimer >= 600) {
speedBoostTimer = 0;
speedIncrease += 4; // Double the speed increase every 10 seconds
var newSpeed = 8 + speedIncrease;
// Animate speed increase with tween for smooth transition
tween(window, {
gameSpeed: newSpeed
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Update all existing banana speeds after tween completes
for (var i = 0; i < bananas.length; i++) {
if (bananas[i].speed !== undefined) {
bananas[i].speed = gameSpeed;
}
if (bananas[i].speedX !== undefined) {
bananas[i].speedX = gameSpeed;
bananas[i].speedY = -gameSpeed * 0.8;
}
}
// Update all existing meteorite speeds after tween completes
for (var i = 0; i < meteorites.length; i++) {
if (meteorites[i].speed !== undefined) {
meteorites[i].speed = gameSpeed * 1.5;
}
}
}
});
// Visual feedback for speed boost
LK.effects.flashScreen(0x00FF00, 300);
}
// Update score
updateScore();
// Spawn bananas
spawnTimer++;
var spawnRate = Math.max(80 - Math.floor(gameScore / 100) * 5, 40); // Spawn rate increases with score
if (spawnTimer >= spawnRate) {
spawnBanana();
spawnTimer = 0;
}
// Spawn meteorites every 5 seconds (300 frames = 5 seconds at 60fps)
meteoriteTimer++;
if (meteoriteTimer >= 300) {
spawnMeteorite();
meteoriteTimer = 0;
}
// Update clouds
for (var i = 0; i < clouds.length; i++) {
clouds[i].speed = (gameSpeed + speedIncrease) * 0.3;
}
// Check collisions
checkCollisions();
// Clean up off-screen bananas
for (var i = bananas.length - 1; i >= 0; i--) {
if (bananas[i].x < -100 + cameraOffsetX) {
bananas[i].destroy();
bananas.splice(i, 1);
}
}
// Clean up off-screen meteorites
for (var i = meteorites.length - 1; i >= 0; i--) {
if (meteorites[i].x < -100 + cameraOffsetX) {
meteorites[i].destroy();
meteorites.splice(i, 1);
}
}
};
function showCustomGameOverMessage() {
// Create custom game over message
var gameOverMessage = new Text2('¡Suerte pa la próxima bot!', {
size: 64,
fill: 0xFF4444
});
gameOverMessage.anchor.set(0.5, 0.5);
gameOverMessage.x = 1024; // Center of screen
gameOverMessage.y = 1366; // Center of screen
gameOverMessage.alpha = 0; // Start invisible
gameOverMessage.scaleX = 0.5;
gameOverMessage.scaleY = 0.5;
LK.gui.center.addChild(gameOverMessage);
// Animate message appearance
tween(gameOverMessage, {
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
// Wait a bit then show official game over
LK.setTimeout(function () {
LK.showGameOver();
}, 1500);
}
});
}