User prompt
Add a condition to display yesmessagedisplay after box is destroyed if iskiityvisible is true. If not display nomessagdisplay
User prompt
destroy box on doubleclikc
User prompt
on game start randomly display kitty or nokitty
User prompt
Fix Bug: 'TypeError: self.explode is not a function' in this line: 'self.explode();' Line Number: 29
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: boxGraphics.setTexture is not a function' in this line: 'boxGraphics.setTexture('explodedBox');' Line Number: 34
User prompt
Fix Bug: 'TypeError: boxGraphics.changeTexture is not a function' in this line: 'boxGraphics.changeTexture('explodedBox');' Line Number: 34
User prompt
Fix Bug: 'TypeError: boxGraphics.setTexture is not a function' in this line: 'boxGraphics.setTexture('explodedBox');' Line Number: 34
User prompt
Fix Bug: 'TypeError: boxGraphics.changeTexture is not a function' in this line: 'boxGraphics.changeTexture('explodedBox');' Line Number: 34
User prompt
Fix Bug: 'TypeError: boxGraphics.setTexture is not a function' in this line: 'boxGraphics.setTexture('explodedBox');' Line Number: 34
User prompt
on double click explode box
User prompt
allow swipe on ox
User prompt
remove drag from box
User prompt
Fix Bug: 'ReferenceError: obj is not defined' in this line: 'dragEnd = obj.event.getLocalPosition(self.parent);' Line Number: 35
User prompt
Fix Bug: 'TypeError: LK.stageContainer.getPointerPosition is not a function' in this line: 'dragEnd = LK.stageContainer.getPointerPosition();' Line Number: 35
User prompt
Fix Bug: 'TypeError: LK.stage.getPointerPosition is not a function' in this line: 'dragEnd = LK.stage.getPointerPosition();' Line Number: 35
User prompt
add move detection on tick
User prompt
box should move on swipe on the swipe direction.
User prompt
change draggin box to swipping
User prompt
add move to box
Code edit (2 edits merged)
Please save this source code
User prompt
bring box top on z axis
User prompt
if box is double clicked it sould be destoryed
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -25,8 +25,11 @@
clickCount = 1;
}
lastClickTime = currentTime;
if (clickCount === 2) {
+ self.emit('boxDestroyed', {
+ isKittyVisible: isKittyVisible
+ });
self.destroy();
}
});
});
@@ -38,8 +41,15 @@
var Game = Container.expand(function () {
var self = Container.call(this);
LK.stageContainer.setBackgroundColor(0x000000);
var kitty = self.addChild(new Kitty());
+ box.on('boxDestroyed', function (event) {
+ if (event.isKittyVisible) {
+ yesMessageDisplay.show();
+ } else {
+ noMessageDisplay.show();
+ }
+ });
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());
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