User prompt
crea un nuevo texto debajo de "meters" que diga la cantidad de giros
User prompt
crea una nueva variable "giros"
User prompt
agregale a player el sonido rockmovement en bucle
User prompt
haz que el texto contador sea más grande
User prompt
agrega un texto en la parte superior que diga cuanto metros lleva recorrido
User prompt
agrega un variable que sea sobre "metros" que cada 1 segundo suba el valor en 1
Code edit (1 edits merged)
Please save this source code
User prompt
haz que entre cambio de giro haya na espera de 0.1 segundos
User prompt
arreglalo
User prompt
haz que sea un bucle
User prompt
una vez finalice el rotamiento haz que haga lo mismo pero invertido
User prompt
un poquito más lento
User prompt
haz que la rotación sea más lenta
User prompt
haz que el giro frene despues de 0.2 segundos
Code edit (2 edits merged)
Please save this source code
User prompt
haz que player rote
User prompt
ahora no hace el movimiento
User prompt
haz que sea más suave y cuando gire un poco a la derecha que cambie la rotación hacia la izquierda
User prompt
haz que player tenga una pequeña rotación en bucle para que parezca que camina
User prompt
hazle una animación a player para que parezca que camina ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Corrige la linea 25 "if (self.y < ground.y - self.height / 2)" para que player pueda estar 10 pixeles más abajo
User prompt
haz que player pueda estar un poco más abajo de la tierra (10 pixeles menos)
User prompt
haz que este 5 pixeles más abajo
User prompt
haz que la posición del jugador sea 1/4 del ancho de la pantalla
/**** * Classes ****/ // Create a Player class var Player = Container.expand(function () { var self = Container.call(this); // Attach a shape asset to represent the player var playerGraphics = self.attachAsset('character', { anchorX: 0.5, anchorY: 0.5 }); // Set player speed self.speed = 5; // This is automatically called every game tick, if the player is attached! self.update = function () { self.y += self.speed; // Add gravity to the player if (self.y < ground.y - self.height / 2 + 50) { self.speed += 0.5; } else { self.speed = 0; self.y = ground.y - self.height / 2 + 50; } // Add rotation to the player self.rotation += 0.1; }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Create a background asset // Initialize a player asset var background = LK.getAsset('background', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); // Add the background to the game game.addChild(background); // Create a clone of the background asset var backgroundClone = LK.getAsset('background', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 + background.width, y: 2732 / 2 }); // Add the clone to the game game.addChild(backgroundClone); // Create a second clone of the background asset var backgroundClone2 = LK.getAsset('background', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 + 2 * background.width, y: 2732 / 2 }); // Add the second clone to the game game.addChild(backgroundClone2); // Initialize a ground asset var ground = LK.getAsset('ground', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, width: background.width, alpha: 0 }); // Add the ground to the game game.addChild(ground); // Create a player instance and add it to the game var player = game.addChild(new Player()); // Position player more towards the center of the screen player.x = 2048 / 4; player.y = 2732 / 2 + 10; game.update = function () { background.x -= 5; backgroundClone.x -= 5; backgroundClone2.x -= 5; if (background.x + background.width < 0) { background.x = backgroundClone2.x + background.width; } if (backgroundClone.x + backgroundClone.width < 0) { backgroundClone.x = background.x + background.width; } if (backgroundClone2.x + backgroundClone2.width < 0) { backgroundClone2.x = backgroundClone.x + backgroundClone.width; } };
===================================================================
--- original.js
+++ change.js
@@ -21,32 +21,9 @@
self.speed = 0;
self.y = ground.y - self.height / 2 + 50;
}
// Add rotation to the player
- if (!self.rotationStopped) {
- if (self.reverseRotation) {
- self.rotation -= 0.03; // Reverse rotation
- } else {
- self.rotation += 0.03; // Normal rotation
- }
- // Stop rotation after 0.2 seconds
- LK.setTimeout(function () {
- self.rotationStopped = true;
- // Start reverse rotation after 0.1 seconds
- LK.setTimeout(function () {
- self.rotationStopped = false;
- self.reverseRotation = !self.reverseRotation; // Toggle reverseRotation
- // Restart the rotation loop
- if (!self.rotationStopped) {
- if (self.reverseRotation) {
- self.rotation -= 0.03; // Reverse rotation
- } else {
- self.rotation += 0.03; // Normal rotation
- }
- }
- }, 100); // Changed delay to 0.1 seconds
- }, 200);
- }
+ self.rotation += 0.1;
};
});
/****
@@ -58,10 +35,10 @@
/****
* Game Code
****/
-// Initialize a player asset
// Create a background asset
+// Initialize a player asset
var background = LK.getAsset('background', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2,
que no contenga sombras ni luces
una cabeza de moai redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera de hierro. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera de oro. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
una piedra redonda musgosa. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
la bandera de argentina redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de cobre. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de silver. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de gold. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
diamante Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una rueda de carretilla medieval. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
pelota de basquetbal modelo Molten. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
pelota de futbol hecha de hielo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Bola disco. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de voley de planta. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de pinchos. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de lana. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Agrega una esfera que dentro contenga un cielo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera con la via láctea. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
proporción 1000-2000, marios más robustos y sin tanto relieve
Un papel medieval con una enorme flecha hacia la izquierda de pintura en medio. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera del dragon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera demoniaca. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera de hada. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
una manzana redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un capiraba redondo como una pelota. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un armadillo hecho bolita. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una estrella redondita. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Mejorar el diseños de lás casas para que sean más medievales y aumentar su calidad, más arboles y mejorar la calidad del cesped