User prompt
Move up the cat arm with 10 units
User prompt
Move up the cat arm with 20 units
User prompt
Move up the cat arm with 20 units
User prompt
Match the top of the cat's arm to the top of the box.
User prompt
Fit the bottom of the lamp to the top of the box
User prompt
Place the lamp on top of the box.
User prompt
Add a lamp
User prompt
Add a lamp
User prompt
Add a box
User prompt
Add a box roof
User prompt
Move up the switch with 20 units
User prompt
Hide the cat arm behind the cat.
User prompt
Do it
User prompt
The box must not cover the catarm.
User prompt
The box, the table and the switch must not cover the cat arm.
User prompt
Move down the cat arm with 400 units
User prompt
Move down the cat arm with 400 units
User prompt
Move down the cat with 20 units
User prompt
Move up the cat with 20 units
User prompt
Move up the cat with 20 units
User prompt
Move up the cat with 20 units
User prompt
Move up the switch with 30 units
User prompt
Move down the switch with 50 units
User prompt
Move down the switch with 100 units
User prompt
Move down the box with 20 units
/**** * Classes ****/ // Assets will be automatically created and loaded by the LK engine based on their usage in the code. // Define a class for the Cat var Cat = Container.expand(function () { var self = Container.call(this); var catGraphics = self.attachAsset('cat', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2 + 210; }); // Define a class for the Cat Paw var CatPaw = Container.expand(function () { var self = Container.call(this); var pawGraphics = self.attachAsset('catPaw', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2 - 200; // Position above the cat }); // Define a class for the Rocker Switch var RockerSwitch = Container.expand(function () { var self = Container.call(this); var switchGraphics = self.attachAsset('rockerSwitch', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2 + 720; // Move the rocker switch up by 30 units self.isTouched = false; // Event handler for when the switch is touched self.down = function (x, y, obj) { self.isTouched = true; LK.effects.flashScreen(0xff0000, 1000); // Flash screen red LK.showGameOver(); // End the game }; }); // Define a class for the Table var Table = Container.expand(function () { var self = Container.call(this); var tableGraphics = self.attachAsset('table', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; // Center the table horizontally self.y = 2732 / 2 + 2200; // Move the table down by 2000 units }); // Define a class for the Wallpaper var Wallpaper = Container.expand(function () { var self = Container.call(this); var wallpaperGraphics = self.attachAsset('wallpaper', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; // Center the wallpaper horizontally self.y = 2732 / 2 - 300; // Move the wallpaper up by 300 units }); // Define a class for the Wooden Box var WoodenBox = Container.expand(function () { var self = Container.call(this); var boxGraphics = self.attachAsset('woodenBox', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; // Center the wooden box horizontally self.y = 2732 / 2 + 720; // Move the wooden box down by 220 units }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 // Init game with black background }); /**** * Game Code ****/ // Add the wallpaper to the game var wallpaper = game.addChild(new Wallpaper()); // Initialize game elements var cat = game.addChild(new Cat()); var catPaw = game.addChild(new CatPaw()); var rockerSwitch = game.addChild(new RockerSwitch()); // Add the table to the game var table = game.addChild(new Table()); // Add the rocker switch to the game var rockerSwitch = game.addChild(new RockerSwitch()); // Add the wooden box to the game var woodenBox = game.addChild(new WoodenBox()); // Add the rocker switch to the game var rockerSwitch = game.addChild(new RockerSwitch()); // Game update loop game.update = function () { // Check if the rocker switch is touched if (rockerSwitch.isTouched) { // Game over logic is handled in the RockerSwitch class } }; // Handle touch events on the game game.down = function (x, y, obj) { // Convert global coordinates to local game coordinates var localPos = game.toLocal(obj.global); // Check if the touch is on the rocker switch if (rockerSwitch.intersects({ x: localPos.x, y: localPos.y, width: 1, height: 1 })) { rockerSwitch.down(x, y, obj); } };
===================================================================
--- original.js
+++ change.js
@@ -9,9 +9,9 @@
anchorX: 0.5,
anchorY: 0.5
});
self.x = 2048 / 2;
- self.y = 2732 / 2 + 230;
+ self.y = 2732 / 2 + 210;
});
// Define a class for the Cat Paw
var CatPaw = Container.expand(function () {
var self = Container.call(this);
Tricolor cat face view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
simple coffee table front view.
matte white rockerSwitch front view.
fehér fényű mennyezeti lámpa.
yellow stickyNote with "Let the cat sleep! Xoxo!" text and a red-stain.
thin, black, up and down arrow.