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
@@ -88,8 +88,29 @@
});
};
});
var Game = Container.expand(function () {
+ for (var i = 0; i < 8; i++) {
+ var bowl = new Bowl();
+ var sugar = new Sugar();
+ var butter = new Butter();
+ var egg = new Egg();
+ bowl.x = i * (bowl.width + 10);
+ sugar.x = 200 + Math.random() * 1600;
+ sugar.y = 200 + Math.random() * 2032;
+ butter.x = 200 + Math.random() * 1600;
+ butter.y = 200 + Math.random() * 2032;
+ egg.x = 200 + Math.random() * 1600;
+ egg.y = 200 + Math.random() * 2032;
+ bowls.push(bowl);
+ sugars.push(sugar);
+ butters.push(butter);
+ eggs.push(egg);
+ self.addChild(bowl);
+ self.addChild(sugar);
+ self.addChild(butter);
+ self.addChild(egg);
+ }
var self = Container.call(this);
stage.on('down', function (obj) {
var pos = obj.event.getLocalPosition(self);
bowls.forEach(function (bowl, index) {
@@ -168,7 +189,6 @@
eggs.push(egg);
self.addChild(bowl);
self.addChild(sugar);
self.addChild(butter);
- self.addChild(egg);
}
});
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.