User prompt
счетчик слева
User prompt
счетчик жизней в виде красного сердца
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'set')' in or related to this line: 'livesTxt.anchor.set(1, 0); // Sets anchor to the right of the top edge of the text.' Line Number: 178
User prompt
счетчик жизней в виде сердца
User prompt
враги стоят на месте 30 секунд когда игрок соберет золотую какашку
User prompt
враги стоят на месте 200 секунд когда игрок соберет золотую какашку
User prompt
враги стоят на месте 30 секунд когда игрок соберет золотую какашку
User prompt
удали врагов на 30 секунд когда игрок соберет золотую какашку
User prompt
останови врагов на 100 секунд когда игрок соберет золотую какашку
User prompt
останови врагов на 30 секунд когда игрок соберет золотую какашку
User prompt
останови врагов на 10 секунд когда игрок соберет золотую какашку
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -88,20 +88,12 @@
}
}
};
});
-// Heart class
-var Heart = Container.expand(function () {
- var self = Container.call(this);
- var heartGraphics = self.attachAsset('heart', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
// Life class
var Life = Container.expand(function () {
var self = Container.call(this);
- var lifeGraphics = self.attachAsset('heart', {
+ var lifeGraphics = self.attachAsset('life', {
anchorX: 0.5,
anchorY: 0.5
});
self.reposition = function () {
@@ -159,14 +151,14 @@
var scoreTxt = new Text2('0', {
size: 150,
fill: "#0000FF" // Blue color
});
-scoreTxt.anchor.set(0.5, 0); // Sets anchor to the center of the top edge of the text.
-LK.gui.top.addChild(scoreTxt); // Add the score text to the GUI overlay at the top of the screen.
+scoreTxt.anchor.set(0, 0); // Sets anchor to the left of the top edge of the text.
+LK.gui.topLeft.addChild(scoreTxt); // Add the score text to the GUI overlay at the top left of the screen.
// Initialize and display player lives
-var livesTxt = new Text2('Lives: ' + playerLives, {
+var livesTxt = new Text2('10', {
size: 150,
- fill: "#0000FF" // Blue color
+ fill: "#FF0000" // Red color
});
livesTxt.anchor.set(1, 0); // Sets anchor to the right of the top edge of the text.
LK.gui.topRight.addChild(livesTxt); // Add the lives text to the GUI overlay at the top right of the screen.
var enemyScore = 0;
toilet room background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
fly
poop. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
мультяшный парень с темными волосами бородой и светлыми прядями. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
сердце-какашка. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
золотая какашка. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.