User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'alpha')' in or related to this line: 'newBg.alpha = 0;' Line Number: 121
Code edit (1 edits merged)
Please save this source code
User prompt
restore the features that made background change when level change
Code edit (2 edits merged)
Please save this source code
User prompt
remove the 2nd cloneGraphic and use the 1st declared one. fix its declaration scope
User prompt
create the clone before the LK.setTimeout(function () {...}, 205);
Code edit (5 edits merged)
Please save this source code
User prompt
in animateExplosion, create a clone self.nextGraphic and animate it instead of animating self.nextGraphic directly (Use only allowed way to create the clone)
Code edit (4 edits merged)
Please save this source code
User prompt
create a propery in ProgressManager for the maxHeartBeatsPerSecond with 8 value
User prompt
create a propery in ProgressManager for the fixed 8 value
Code edit (2 edits merged)
Please save this source code
User prompt
in updateGame, add a 300ms delay between each bigHeart.animateBeat(); call
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: VALUE is not defined' in or related to this line: 'if (self.lastX <= VALUE && self.x > VALUE) {' Line Number: 193
User prompt
implement 1. without breaking anything
User prompt
call to Projections.updateHeartType was lost. add it again
Code edit (7 edits merged)
Please save this source code
User prompt
these lines seem redundant: var nextIndex = (bigHeart.heartType + 1) % 10; bigHeart.heartFrames[nextIndex][5].visible = true; bigHeart.heartFrames[nextIndex][4].visible = true; fix please
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: TWEEN is not defined' in or related to this line: 'TWEEN.remove(frame);' Line Number: 377 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
before switching to next level, ensure that all frames of previous level are hidden
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -27,9 +27,9 @@
var currentBg = self.backgrounds.find(function (bg) {
return bg.visible;
});
var newBg = self.backgrounds[index];
- if (currentBg !== newBg) {
+ if (newBg && currentBg !== newBg) {
tween(currentBg, {
alpha: 0
}, {
duration: 500,
@@ -236,8 +236,9 @@
self.addChild(cloneGraphic);
}
LK.setTimeout(function () {
LK.effects.flashScreen(0xffffff, 1000); // Flash the screen white for 500ms
+ background.changeBackground(self.currentLevel + 1); // Change background when level changes
if (self.nextGraphic) {
log("nextGraphic for explosion!", self.nextGraphic);
tween(cloneGraphic, {
scaleX: 45,
@@ -712,9 +713,8 @@
});
bigHeart.animateExplosion(function () {
self.currentLevel++;
bigHeart.heartType = self.currentLevel;
- background.changeBackground(self.currentLevel); // Change background when level changes
bigHeart.currentGraphic = bigHeart.heartFrames[bigHeart.heartType][5];
bigHeart.nextGraphic = bigHeart.heartFrames[bigHeart.heartType][4];
bigHeart.currentGraphic.visible = true;
projectionsManager.updateHeartType(bigHeart.heartType);
a big lovely heart
a big stone heart
a big used copper heart
face view of a big bronze heart
face view of a big silver heart
Big shining gold heart verly slightly ornate. face view.
Big precious shiny porcelain heart slightly ornate. face view.
Large precious heart in mother-of-pearl, lightly ornate. Front view.
Large heart in precious ruby, very lightly decorated. Front view.
The most precious large heart in diamond, Front view.
clean pink enamel board witha very thin border