Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setKittyVisible')' in this line: 'game.setKittyVisible(false);' Line Number: 138
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setKittyVisible')' in this line: 'self.game.setKittyVisible(false);' Line Number: 137
User prompt
Fix Bug: 'Uncaught TypeError: self.game.setKittyVisible is not a function' in this line: 'self.game.setKittyVisible(false);' Line Number: 137
User prompt
Fix Bug: 'Uncaught TypeError: self.game.setKittyVisible is not a function' in this line: 'self.game.setKittyVisible(true);' Line Number: 139
User prompt
Fix Bug: 'Uncaught TypeError: self.game.isKittyVisible is not a function' in this line: 'self.game.isKittyVisible(false);' Line Number: 137
User prompt
Fix Bug: 'Uncaught TypeError: self.game.kittyVisible is not a function' in this line: 'self.game.kittyVisible(true);' Line Number: 139
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: self.game.isKittyVisible is not a function' in this line: 'self.game.isKittyVisible(true);' Line Number: 139
Code edit (12 edits merged)
Please save this source code
User prompt
Fix Bug: 'kitty is not defined' in this line: 'kitty.x = 2048 / 2;' Line Number: 157
User prompt
Fix Bug: 'Uncaught ReferenceError: kitty is not defined' in this line: 'kitty.x = 2048 / 2;' Line Number: 157
Code edit (1 edits merged)
Please save this source code
User prompt
Add game.setboxdestroyes twhen box is swiped
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'updateBoxDestroyed')' in this line: 'self.parent.updateBoxDestroyed(true);' Line Number: 84
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.parent.setBoxDestroyed(true);' Line Number: 83
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.parent.setBoxDestroyed(true);' Line Number: 53
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'boxDestroyed')' in this line: 'self.parent.boxDestroyed = true;' Line Number: 82
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.parent.setBoxDestroyed();' Line Number: 53
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'boxDestroyed')' in this line: 'self.parent.boxDestroyed = true;' Line Number: 53
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'updateBoxDestroyed')' in this line: 'self.parent.updateBoxDestroyed(true);' Line Number: 53
User prompt
Do a callback from game to box to update the status of boxdestroyed
User prompt
Set selfboxdestoy true on swipe box
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'boxDestroyed')' in this line: 'self.parent.boxDestroyed = true;' Line Number: 53
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'getChildByName')' in this line: 'self.parent.getChildByName('GameInstance').boxDestroyed = true;' Line Number: 53
===================================================================
--- original.js
+++ change.js
@@ -133,33 +133,16 @@
if (!isKittyVisible) {
var shadowGraphics = self.createAsset('shadow', 'Shadow Graphics', .5, 1);
self.addChildAt(shadowGraphics, 0);
shadowGraphics.y = kittyGraphics.height / 2 + 20;
+ self.game.isKittyyVissible = false;
}
+ self.game.isKittyyVissible = true;
});
var Game = Container.expand(function () {
var self = Container.call(this);
- this.setBoxDestroyed = function () {
- this.boxDestroyed = true;
- if (kitty.isKittyVisible) {
- yesMessageDisplay.show();
- } else {
- noMessageDisplay.show();
- }
- };
LK.stageContainer.setBackgroundColor(0x000000);
- this.boxDestroyed = false;
- this.updateBoxDestroyed = function (status) {
- this.boxDestroyed = status;
- if (this.boxDestroyed) {
- if (kitty.isKittyVisible) {
- yesMessageDisplay.show();
- } else {
- noMessageDisplay.show();
- }
- }
- };
- var kitty = self.addChild(new Kitty());
+ ;
var messageDisplay = self.addChild(new MessageDisplay('yesorno', 'Yes or No Display'));
var yesMessageDisplay = self.addChild(new MessageDisplay('yes', 'Yes Display'));
var noMessageDisplay = self.addChild(new MessageDisplay('no', 'No Display'));
self.box = self.addChild(new Box(self));
@@ -170,19 +153,21 @@
yesMessageDisplay.visible = false;
noMessageDisplay.visible = false;
self.box.x = 2048 / 2;
self.box.y = 2732 / 2;
+ var kitty = self.addChild(new Kitty());
kitty.x = 2048 / 2;
kitty.y = 2732 / 2;
messageDisplay.x = self.box.x;
messageDisplay.y = self.box.y - 800;
messageDisplay.show();
- LK.on('tick', function () {
- if (self.boxDestroyed) {
- if (kitty.isKittyVisible) {
- yesMessageDisplay.visible = true;
- } else {
- noMessageDisplay.visible = true;
- }
+ this.setBoxDestroyed = function () {
+ this.boxDestroyed = true;
+ if (this.isKittyVisible) {
+ yesMessageDisplay.visible = true;
+ yesMessageDisplay.show();
+ } else {
+ noMessageDisplay.visible = true;
+ noMessageDisplay.show();
}
- });
+ };
});
8-bit. cartoon. red button. do not touch! Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. cartoon. black tub stopper with chain. in game asset.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. cartoon. axe. in game asset. no shadow.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Break in case of emergency square. Ax drawing inside. simple. 8-bit. cartoon. blackand white.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Delete