User prompt
add movement to box
User prompt
create another instance of messagedisplay called no.
User prompt
create another instance of messagedisplay with an asset called yes
Code edit (1 edits merged)
Please save this source code
User prompt
show yesorno asset in assetdisplay, 400 pixels on top of box
User prompt
create a class that will be used to show different assets as messages in the game.
User prompt
add kitty class another asset called nokitty
User prompt
Fix Bug: 'TypeError: kitty.update is not a function' in this line: 'kitty.update();' Line Number: 30
User prompt
Fix Bug: 'TypeError: box.update is not a function' in this line: 'box.update();' Line Number: 30
User prompt
Fix Bug: 'ReferenceError: kitty is not defined' in this line: 'if (!kitty.isVisible) {' Line Number: 27
User prompt
After the box is moved or destroyed, if kitty is not visible, then show nokitty asset in the position of kitten
User prompt
if kitty is not visible then show nokitty asset in its position instead
User prompt
create a new asset for nokitty
User prompt
after yesorno is created make sure it is behind box in the z axis
User prompt
yesorno should be behing the box in the z axis
User prompt
box should be in top z axis from yesorno
User prompt
after box is destoryed or moves show messageyes asset if kitty.isvisile is true, or messageno if kitty is not visible.
User prompt
create messageyes and messageno assets to be used in bottommessage
User prompt
Fix Bug: 'Uncaught ReferenceError: YesOrNo is not defined' in this line: 'var yesOrNo = self.addChild(new YesOrNo());' Line Number: 55
User prompt
create a new class named bottommessage. bottom message can show one of many assets.
User prompt
move yes or no 200 pixesl down
User prompt
move yesorno 200 pixels up
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'y')' in this line: 'yesOrNo.y = box.y - 700;' Line Number: 49
User prompt
Fix Bug: 'ReferenceError: yesOrNo is not defined' in this line: 'yesOrNo.visible = true;' Line Number: 90
User prompt
add answer class that will show one out of two assets
===================================================================
--- original.js
+++ change.js
@@ -14,9 +14,15 @@
});
var Box = Container.expand(function () {
var self = Container.call(this);
var boxGraphics = self.createAsset('box', 'Box Graphics', .5, .5);
+ self.vx = 0;
+ self.vy = 0;
self.open = function () {};
+ self.move = function () {
+ self.x += self.vx;
+ self.y += self.vy;
+ };
});
var Kitty = Container.expand(function () {
var self = Container.call(this);
var kittyGraphics = self.createAsset('kitty', 'Kitty Graphics', .5, .5);
@@ -46,6 +52,8 @@
} else {
kitty.dive();
}
});
- LK.on('tick', function () {});
+ LK.on('tick', function () {
+ box.move();
+ });
});
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