Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.addBiteMark is not a function' in this line: 'self.addBiteMark();' Line Number: 107
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'bowls.push(bowl);' Line Number: 104
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(butter);' Line Number: 183
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 188
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(eggs[eggs.length - 1]);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'for (var i = 0; i < 8; i++) {}' Line Number: 175
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'LK.on('tick', function () {});' Line Number: 176
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'Game.prototype.startGame = function () {};' Line Number: 177
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'stage.on('move', function (obj) {});' Line Number: 178
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'stage.on('up', function (obj) {});' Line Number: 179
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.x = newX;' Line Number: 89
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(eggs[eggs.length - 1]);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'for (var i = 0; i < 8; i++) {}' Line Number: 176
===================================================================
--- original.js
+++ change.js
@@ -54,9 +54,9 @@
self.addBiteMark = function () {
var biteMarkGraphics = self.createAsset('bitemark', 'Bite Mark Graphics', .5, .5);
biteMarkGraphics.x = cookieGraphics.x;
biteMarkGraphics.y = cookieGraphics.y;
- biteMarkGraphics.blendMode = "erase";
+ biteMarkGraphics.blendMode = BLEND_MODES.ERASE;
self.addChild(biteMarkGraphics);
};
self.flyToRandomPosition = function () {
var randomX = Math.random() * 2048;
@@ -69,26 +69,25 @@
if (t < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
t--;
return c / 2 * (-Math.pow(2, -10 * t) + 2) + b;
}
- var tickHandler = function () {
+ LK.on('tick', function () {
var currentTime = LK.ticks - startTime;
if (currentTime < duration) {
var newPos = easeInOutElastic(currentTime, start, delta, duration);
callback(newPos);
} else {
callback(end);
- LK.off('tick', tickHandler);
+ LK.off('tick', this);
}
- };
- LK.on('tick', tickHandler);
+ });
};
- self.elasticTween(self.y, randomY, 120, (function (newY) {
+ self.elasticTween(self.y, randomY, 120, function (newY) {
self.y = newY;
- }).bind(self));
- self.elasticTween(self.x, randomX, 120, (function (newX) {
+ });
+ self.elasticTween(self.x, randomX, 120, function (newX) {
self.x = newX;
- }).bind(self));
+ });
};
});
var Game = Container.expand(function () {
var self = Container.call(this);
@@ -169,8 +168,12 @@
self.addChild(butter);
var egg = new Egg();
egg.x = 200 + Math.random() * 1600;
egg.y = 200 + Math.random() * 2032;
- self.addChild(egg);
eggs.push(egg);
+ self.addChild(egg);
}
+ for (var i = 0; i < 8; i++) {}
+ LK.on('tick', function () {});
+ Game.prototype.startGame = function () {};
+ stage.on('move', function (obj) {});
});
egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
sugar in a bag. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a butter stik in its wrapper. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pink kithen bowl. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pile of sugar. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cracked egg white and yolk seeping. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
soft butter stick. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A delicious plain vanilla cookie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A delicious plain vanilla cookie, where three bites have been taken. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cute kawaian bakery interior with strawberry tiles. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cute girl happily eating way too many vanilla cookies. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.