User prompt
add a new condition in kitty class without changing the current ones. if iskittyvisible is true the kitty should have jump movement.
User prompt
ghosly movement shoudl move upwards for 1.5 seconds and then move downwards
Code edit (3 edits merged)
Please save this source code
User prompt
add jump movemet to kitty. this movemnt should only start after box is destroyed.
Code edit (1 edits merged)
Please save this source code
User prompt
spawn shadow on game start
User prompt
Fix Bug: 'Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 't.DisplayObjectContainer' | property 'children' -> object with constructor 'Array' | index 0 -> object with constructor 't.DisplayObjectContainer' --- property 'parent' closes the circle' in this line: 'self.createAsset(self.assetId, 'Shadow Graphics', .5, .5);' Line Number: 4
User prompt
Fix Bug: 'Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 't.DisplayObjectContainer' | property 'children' -> object with constructor 'Array' | index 0 -> object with constructor 't.DisplayObjectContainer' --- property 'parent' closes the circle' in this line: 'var shadowGraphics = this.createAsset(this.assetId, 'Shadow Graphics', .5, .5);' Line Number: 195
User prompt
Fix Bug: 'Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 't.DisplayObjectContainer' | property 'children' -> object with constructor 'Array' | index 0 -> object with constructor 't.DisplayObjectContainer' --- property 'parent' closes the circle' in this line: 'var shadowGraphics = self.createAsset(assetId, 'Shadow Graphics', .5, .5);' Line Number: 3
Code edit (2 edits merged)
Please save this source code
User prompt
create a new indepent class for the shadow asset
User prompt
remove shadows class from kitty. should be an indepent class
User prompt
when ghostly movement happens, only nokitty should move. shadow should remain on initial position
User prompt
gostly movemet shoudl be sutil and always upwards
Code edit (1 edits merged)
Please save this source code
User prompt
add ghosty movement to nokitty. it should only be in a 100 pixel radius. nokitty should only move after box is destroyed.
User prompt
shadows should be displaye both for kitty and nokitty
User prompt
add shadow to kitty
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.setBoxDestroyed is not a function' in this line: 'self.setBoxDestroyed(true);' Line Number: 83
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.game.setBoxDestroyed(true);' Line Number: 197
User prompt
Fix Bug: 'TypeError: self.setBoxDestroyed is not a function' in this line: 'self.setBoxDestroyed(true);' Line Number: 83
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.game.setBoxDestroyed(true);' Line Number: 197
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.game.setBoxDestroyed(true);' Line Number: 197
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'setBoxDestroyed')' in this line: 'self.game.setBoxDestroyed(true);' Line Number: 197
===================================================================
--- original.js
+++ change.js
@@ -173,9 +173,30 @@
self.game = game;
var isKittyVisible = Math.random() < 0.5;
var kittyGraphics = self.createAsset(isKittyVisible ? 'kitty' : 'nokitty', isKittyVisible ? 'Kitty Graphics' : 'No Kitty Graphics', .5, .5);
self.game.isKittyVisible = isKittyVisible;
- if (!isKittyVisible) {
+ if (isKittyVisible) {
+ self.jumpMovement = {
+ x: 0,
+ y: 0,
+ jumpHeight: 10,
+ jumping: false
+ };
+ LK.on('tick', function () {
+ if (self.game.boxDestroyed) {
+ if (!self.jumpMovement.jumping) {
+ self.jumpMovement.jumping = true;
+ self.jumpMovement.y = -self.jumpMovement.jumpHeight;
+ }
+ self.jumpMovement.y += 0.5;
+ if (self.jumpMovement.y > self.jumpMovement.jumpHeight) {
+ self.jumpMovement.jumping = false;
+ }
+ self.x += self.jumpMovement.x;
+ self.y += self.jumpMovement.y;
+ }
+ });
+ } else {
self.ghostyMovement = {
x: 0,
y: -0.5
};
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