User prompt
Set game as parent of box
User prompt
Update boxdestroyed in game class to true when box is destroyed
User prompt
Set boxdestroyed = true in game class when box is destroyed
User prompt
Fix Bug: 'Uncaught ReferenceError: box is not defined' in this line: 'messageDisplay.x = box.x;' Line Number: 164
User prompt
Fix Bug: 'Uncaught ReferenceError: box is not defined' in this line: 'box.x = 2048 / 2;' Line Number: 160
User prompt
game class should check for box destroyed condition
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'onBoxDestroyed')' in this line: 'if (typeof self.parent.onBoxDestroyed === 'function') {' Line Number: 56
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'onBoxDestroyed')' in this line: 'self.parent.onBoxDestroyed(self.boxDestroyed);' Line Number: 56
User prompt
add callback in game class to check status of boxdestroyed in the box class
Code edit (3 edits merged)
Please save this source code
User prompt
console log game.boxdestroyed
User prompt
console log self.boxdestroyed
Code edit (1 edits merged)
Please save this source code
User prompt
add self.destroy flag in box class
User prompt
add self.boxdestroyed in box class console log
User prompt
add self.boxdestoyed value to console log
User prompt
Fix Bug: 'ReferenceError: boxDestroyed is not defined' in this line: 'if (boxDestroyed) {' Line Number: 156
User prompt
Fix Bug: 'ReferenceError: boxDestroyed is not defined' in this line: 'if (boxDestroyed) {' Line Number: 156
Code edit (2 edits merged)
Please save this source code
User prompt
add a game listener to check box status
User prompt
add ghost movement to nokitty
User prompt
send parameter of boxdestroyed from box to game class
Code edit (9 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'boxDestroyed')' in this line: 'self.parent.boxDestroyed = true;' Line Number: 30
User prompt
send box destroyed parameter to game class
===================================================================
--- original.js
+++ change.js
@@ -140,9 +140,9 @@
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'));
- var box = self.addChild(new Box());
+ self.box = self.addChild(new Box());
noMessageDisplay.x = 2048 / 2;
noMessageDisplay.y = 2732 / 2 + 900;
yesMessageDisplay.x = 2048 / 2;
yesMessageDisplay.y = 2732 / 2 + 700;
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