User prompt
deplace the chocolate to the right
User prompt
wait 2 seconds before show game over
User prompt
and now its game over :)
User prompt
place finishedHearth at the center of the screen
User prompt
Please fix the bug: 'Timeout.tick error: finishedHeart is not defined' in or related to this line: 'if (child !== scoreText && child !== finishedHeart) {' Line Number: 135
User prompt
now show the finished heart
User prompt
crée le finishedHearth
User prompt
create the finishedHearth
User prompt
when hearthMoldChoco is dragged into the oven, show the finishedHearth and don't hide the oven
User prompt
when hearthMoldChoco is dragged into the oven, show the finishedHearth
User prompt
enleve le game oveer
User prompt
you d'int change anything, don't talk to me, do it
User prompt
i mean do it
User prompt
i just clicked on the hearth mold and all hided, i wanna hide evrything only when the hearthMoldChoco has been dragged in the oven
User prompt
when the hearthMoldChoco touches the oven, hide evrything
User prompt
Please fix the bug: 'ReferenceError: hearthMoldChoco is not defined' in or related to this line: 'if (fryingPanChoco.intersects(heartMold) && !hearthMoldChoco) {' Line Number: 123
User prompt
stop creates clones of the hearthMoldChoco when its dragging
User prompt
when the fryingPanChoco touches the hearthMold, he have to be hide définitivement
User prompt
こんにちは
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'clone')' in or related to this line: 'self.clone = function () {' Line Number: 115
User prompt
You didn't change anything.
User prompt
Back. Head. Always do it. You didn't change anything.
===================================================================
--- original.js
+++ change.js
@@ -1,30 +1,7 @@
/****
* Classes
****/
-var HearthMoldChoco = Container.expand(function () {
- var self = Container.call(this);
- var hearthMoldChocoGraphics = self.attachAsset('hearthMoldChoco', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.draggable = true;
- self.on('down', function () {
- if (dragNode == null) {
- dragNode = self;
- }
- });
- self.on('up', function () {
- dragNode = null;
- });
- self.on('move', function (obj) {
- if (dragNode == self) {
- var pos = obj.event.getLocalPosition(game);
- self.x = pos.x - self.width / 2;
- self.y = pos.y - self.height / 2;
- }
- });
-});
// Prevent cloning
var ChocolateBar = Container.expand(function () {
var self = Container.call(this);
var chocolateGraphics = self.attachAsset('chocolateBar', {
@@ -42,18 +19,8 @@
LK.setScore(LK.getScore() + 1);
}
};
});
-var HeartMold = Container.expand(function () {
- var self = Container.call(this);
- var moldGraphics = self.attachAsset('heartMold', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.fill = function () {
- // Filling logic will be implemented here
- };
-});
var FinishedHeart = Container.expand(function () {
var self = Container.call(this);
var finishedHeartGraphics = self.attachAsset('finishedHeart', {
anchorX: 0.5,
@@ -88,8 +55,41 @@
self.on('down', function () {
dragNode = self;
});
});
+var HeartMold = Container.expand(function () {
+ var self = Container.call(this);
+ var moldGraphics = self.attachAsset('heartMold', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.fill = function () {
+ // Filling logic will be implemented here
+ };
+});
+var HearthMoldChoco = Container.expand(function () {
+ var self = Container.call(this);
+ var hearthMoldChocoGraphics = self.attachAsset('hearthMoldChoco', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.draggable = true;
+ self.on('down', function () {
+ if (dragNode == null) {
+ dragNode = self;
+ }
+ });
+ self.on('up', function () {
+ dragNode = null;
+ });
+ self.on('move', function (obj) {
+ if (dragNode == self) {
+ var pos = obj.event.getLocalPosition(game);
+ self.x = pos.x - self.width / 2;
+ self.y = pos.y - self.height / 2;
+ }
+ });
+});
/****
* Initialize Game
****/
@@ -100,9 +100,8 @@
/****
* Game Code
****/
// Prevent cloning
-console.log('こんにちは');
var oven = game.addChild(LK.getAsset('oven', {
anchorX: 0.5,
anchorY: 0.5
}));
@@ -115,8 +114,9 @@
hearthMoldChoco.x = heartMold.x;
hearthMoldChoco.y = heartMold.y;
fryingPanChoco.visible = false;
fryingPanChoco.x = -1000; // move it out of the screen
+ fryingPanChoco.destroy(); // destroy fryingPanChoco
oven.visible = true;
}
});
var meltedChocolateBars = [];
a chocolate bar. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple fraying pan. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
make the water more brown
rempli en gris
rempli le de chocolat
a simple fridge. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a chocolate hearth. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.