User prompt
add an animation logic to the animate pumpkin, the purpose should be to reward visually the player for finding a bluepumpkin
User prompt
create a function called animatepumpkin leave the function blank for now
User prompt
make sure all Stage blue pumpkins have it
User prompt
sadly its not working, i don't see the animation, add a delay
User prompt
animationpumpkin purpose is to animate all of the bluepumpkins after them being pressed on, it has to be the first thing that is executed and the rest will not execute until its finished
User prompt
create a function called animatepumpkin leave the function blank for now
User prompt
create a function called animatepumpkin
User prompt
Please fix the bug: 'Uncaught ReferenceError: Comingsoon is not defined' in or related to this line: 'if (Comingsoon) {' Line Number: 105
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: Comingsoon is not defined' in or related to this line: 'if (Comingsoon) {' Line Number: 104
Code edit (2 edits merged)
Please save this source code
User prompt
instantiate comingsoon over race
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: raceModeButton is not defined' in or related to this line: 'if (raceModeButton) {' Line Number: 100
Code edit (3 edits merged)
Please save this source code
User prompt
add relaxbutton to the left of splashscreenpumpkin and racebutton on the right of the splashscreen pumpkin\
User prompt
make the seconddemon image last for 5 second
User prompt
make the image of the first demon last 5 second
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
make sure the end appears above stage13
Code edit (5 edits merged)
Please save this source code
User prompt
function13 also adds TheEnd on screen
User prompt
when Stage13BluePumpkin is pressed, trigger game over
User prompt
when Stage13BluePumpkin is pressed, trigger game over
===================================================================
--- original.js
+++ change.js
@@ -11,8 +11,10 @@
// Function to play the celebration sound
function celebration() {
LK.getSound('sndFound').play();
}
+// Declare raceModeButton globally
+var raceModeButton;
// Declare stages and stagePumpkins globally
var stage01;
var stage01BluePumpkin;
var stage02;
@@ -46,8 +48,14 @@
}
if (splashScreenPumpkin) {
splashScreenPumpkin.destroy();
}
+ if (relaxModeButton) {
+ relaxModeButton.destroy();
+ }
+ if (raceModeButton) {
+ raceModeButton.destroy();
+ }
}
// Declare thirdDemon globally
var thirdDemon;
// Function to destroy Stage elements
@@ -130,60 +138,8 @@
if (stage13BluePumpkin) {
stage13BluePumpkin.destroy();
}
}
-// Function01 to instantiate Stage01 and Stage01Pumpkin
-function Function01() {
- // Instantiate Stage01 in the center of the playspace
- stage01 = LK.getAsset('Stage01', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage01.x = 2048 / 2;
- stage01.y = 2732 / 2 + 360;
- game.addChild(stage01);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Function02 to instantiate Stage02 and Stage02BluePumpkin
- function Function02() {
- // Instantiate Stage02 in the center of the playspace
- stage02 = LK.getAsset('Stage02', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage02.x = 2048 / 2;
- stage02.y = 2732 / 2 + 360;
- game.addChild(stage02);
- // Instantiate Stage02BluePumpkin on the playspace
- stage02BluePumpkin = LK.getAsset('Stage02BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage02BluePumpkin.x = 2048 / 2 + 880;
- stage02BluePumpkin.y = 2732 / 2 + 875;
- game.addChild(stage02BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage02BluePumpkin to call destroyStage02Elements and Function03 on press
- stage02BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function03();
- };
- }
- // Instantiate Stage01Pumpkin on the playspace
- stage01BluePumpkin = LK.getAsset('Stage01BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage01BluePumpkin.x = 2048 / 2 + 100;
- stage01BluePumpkin.y = 2732 / 2 + 425;
- game.addChild(stage01BluePumpkin);
- // Add event listener to stage01Pumpkin to call destroyStage01Elements and Function02 on press
- stage01BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function02();
- };
-}
// Instantiate the background in the center of the playspace
var background = LK.getAsset('Background', {
anchorX: 0.5,
anchorY: 0.5
@@ -215,22 +171,22 @@
var raceButton = LK.getAsset('RaceButton', {
anchorX: 0.5,
anchorY: 0.5
});
-raceButton.x = splashScreenPumpkin.x + 300; // Adjust position to the right
+raceButton.x = splashScreenPumpkin.x + 500; // Adjust position to the right
raceButton.y = splashScreenPumpkin.y;
game.addChild(raceButton);
// Instantiate RelaxModeButton to the left of splashScreenPumpkin
var relaxModeButton = LK.getAsset('RelaxModeButton', {
anchorX: 0.5,
anchorY: 0.5
});
-relaxModeButton.x = splashScreenPumpkin.x - 300; // Adjust position to the left
+relaxModeButton.x = splashScreenPumpkin.x - 500; // Adjust position to the left
relaxModeButton.y = splashScreenPumpkin.y;
game.addChild(relaxModeButton);
// Removed duplicate splashScreen instantiation
// Add event listener to splashScreenPumpkin to call destroySplashScreenElements on press
-splashScreenPumpkin.down = function (x, y, obj) {
+relaxModeButton.down = function (x, y, obj) {
destroySplashScreenElements();
Function01();
};
// Animate splashScreenPumpkin to bob up and down slowly
@@ -251,8 +207,60 @@
});
gripDemon.x = 2048 / 2;
gripDemon.y = 2732 / 2 - 1300;
game.addChild(gripDemon);
+// Function01 to instantiate Stage01 and Stage01Pumpkin
+function Function01() {
+ // Instantiate Stage01 in the center of the playspace
+ stage01 = LK.getAsset('Stage01', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage01.x = 2048 / 2;
+ stage01.y = 2732 / 2 + 360;
+ game.addChild(stage01);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Instantiate Stage01Pumpkin on the playspace
+ stage01BluePumpkin = LK.getAsset('Stage01BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage01BluePumpkin.x = 2048 / 2 + 100;
+ stage01BluePumpkin.y = 2732 / 2 + 425;
+ game.addChild(stage01BluePumpkin);
+ // Add event listener to stage01Pumpkin to call destroyStage01Elements and Function02 on press
+ stage01BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function02();
+ };
+}
+// Function02 to instantiate Stage02 and Stage02BluePumpkin
+function Function02() {
+ // Instantiate Stage02 in the center of the playspace
+ stage02 = LK.getAsset('Stage02', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage02.x = 2048 / 2;
+ stage02.y = 2732 / 2 + 360;
+ game.addChild(stage02);
+ // Instantiate Stage02BluePumpkin on the playspace
+ stage02BluePumpkin = LK.getAsset('Stage02BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage02BluePumpkin.x = 2048 / 2 + 880;
+ stage02BluePumpkin.y = 2732 / 2 + 875;
+ game.addChild(stage02BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage02BluePumpkin to call destroyStage02Elements and Function03 on press
+ stage02BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function03();
+ };
+}
// Function03 to instantiate Stage03 and Stage03BluePumpkin
function Function03() {
// Instantiate Stage03 in the center of the playspace
stage03 = LK.getAsset('Stage03', {
@@ -286,342 +294,8 @@
LK.stopMusic();
LK.setTimeout(function () {
LK.getSound('sndBreathing').play();
}, 1000);
- // Function04 to instantiate Stage04 and Stage04BluePumpkin
- function Function04() {
- // Instantiate Stage04 in the center of the playspace
- stage04 = LK.getAsset('Stage04', {
- anchorX: 0.5,
- anchorY: 0.5,
- scaleX: 1,
- scaleY: 1
- });
- stage04.x = 2048 / 2;
- stage04.y = 2732 / 2 + 360;
- game.addChild(stage04);
- // Instantiate Stage04BluePumpkin on the playspace
- stage04BluePumpkin = LK.getAsset('Stage04BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage04BluePumpkin.x = 2048 / 2 - 365; // Example position
- stage04BluePumpkin.y = 2732 / 2 + 470; // Example position
- game.addChild(stage04BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage04BluePumpkin to call destroyStageElements and Function05 on press
- stage04BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function05();
- };
- }
- // Function05 to instantiate Stage05 and Stage05BluePumpkin
- function Function05() {
- // Instantiate Stage05 in the center of the playspace
- stage05 = LK.getAsset('Stage05', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage05.x = 2048 / 2;
- stage05.y = 2732 / 2 + 360;
- game.addChild(stage05);
- // Instantiate Stage05BluePumpkin on the playspace
- stage05BluePumpkin = LK.getAsset('Stage05BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage05BluePumpkin.x = 2048 / 2 + 875; // Example position
- stage05BluePumpkin.y = 2732 / 2 + 800; // Example position
- game.addChild(stage05BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage05BluePumpkin to call destroyStageElements and Function06 on press
- stage05BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function06();
- };
- }
- // Function06 to instantiate Stage06 and Stage06BluePumpkin
- function Function06() {
- // Instantiate Stage06 in the center of the playspace
- stage06 = LK.getAsset('Stage06', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage06.x = 2048 / 2;
- stage06.y = 2732 / 2 + 360;
- game.addChild(stage06);
- // Instantiate Stage06BluePumpkin on the playspace
- stage06BluePumpkin = LK.getAsset('Stage06BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage06BluePumpkin.x = 2048 / 2 - 300; // Example position
- stage06BluePumpkin.y = 2732 / 2 + 1000; // Example position
- game.addChild(stage06BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage06BluePumpkin to call destroyStageElements on press
- stage06BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function07();
- // You can add further actions here if needed
- };
- }
- // Function07 to instantiate Stage07 and Stage07BluePumpkin
- function Function07() {
- // Instantiate Stage07 in the center of the playspace
- stage07 = LK.getAsset('Stage07', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage07.x = 2048 / 2;
- stage07.y = 2732 / 2 + 360;
- game.addChild(stage07);
- // Instantiate Stage07BluePumpkin on the playspace
- stage07BluePumpkin = LK.getAsset('Stage07BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage07BluePumpkin.x = 2048 / 2 - 850; // Example position
- stage07BluePumpkin.y = 2732 / 2 + 75; // Example position
- game.addChild(stage07BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage07BluePumpkin to call destroyStageElements on press
- stage07BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- // Instantiate SecondDemon in the center of the playspace
- var secondDemon = LK.getAsset('SecondDemon', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- secondDemon.x = 2048 / 2;
- secondDemon.y = 2732 / 2;
- game.addChild(secondDemon);
- LK.stopMusic(); // Stop Halloween music when SecondDemon is instantiated
- LK.setTimeout(function () {
- LK.getSound('sndDog').play();
- }, 1000);
- // Add event listener to SecondDemon to call Function08, restart music, and destroy self on press
- secondDemon.down = function (x, y, obj) {
- Function08();
- LK.playMusic('HalloweenMusic', {
- loop: true
- });
- secondDemon.destroy();
- };
- };
- }
- // Function08 to instantiate Stage08 and Stage08BluePumpkin
- function Function08() {
- // Instantiate Stage08 in the center of the playspace
- stage08 = LK.getAsset('Stage08', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage08.x = 2048 / 2;
- stage08.y = 2732 / 2 + 360;
- game.addChild(stage08);
- // Instantiate Stage08BluePumpkin on the playspace
- stage08BluePumpkin = LK.getAsset('Stage08BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage08BluePumpkin.x = 2048 / 2 + 500; // Example position
- stage08BluePumpkin.y = 2732 / 2 + 1000; // Example position
- game.addChild(stage08BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage08BluePumpkin to call destroyStageElements and Function09 on press
- stage08BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function09();
- };
- }
- // Function09 to instantiate Stage09 and Stage09BluePumpkin
- function Function09() {
- // Instantiate Stage09 in the center of the playspace
- stage09 = LK.getAsset('Stage09', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage09.x = 2048 / 2;
- stage09.y = 2732 / 2 + 360;
- game.addChild(stage09);
- // Instantiate Stage09BluePumpkin on the playspace
- stage09BluePumpkin = LK.getAsset('Stage09BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage09BluePumpkin.x = 2048 / 2 + 800; // Example position
- stage09BluePumpkin.y = 2732 / 2 + 300; // Example position
- game.addChild(stage09BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage09BluePumpkin to call destroyStageElements and Function10 on press
- stage09BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function10();
- // You can add further actions here if needed
- };
- }
- // Function10 to instantiate Stage10 and Stage10BluePumpkin
- function Function10() {
- // Instantiate Stage10 in the center of the playspace
- stage10 = LK.getAsset('Stage10', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage10.x = 2048 / 2;
- stage10.y = 2732 / 2 + 360;
- game.addChild(stage10);
- // Instantiate Stage10BluePumpkin on the playspace
- stage10BluePumpkin = LK.getAsset('Stage10BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage10BluePumpkin.x = 2048 / 2 - 375; // Example position
- stage10BluePumpkin.y = 2732 / 2 + 1100; // Example position
- game.addChild(stage10BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage10BluePumpkin to call celebration, destroyStageElements, and instantiate ThirdDemon
- stage10BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- // Instantiate ThirdDemon in the center of the playspace
- var thirdDemon = LK.getAsset('ThirdDemon', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- thirdDemon.x = 2048 / 2;
- thirdDemon.y = 2732 / 2;
- game.addChild(thirdDemon);
- LK.stopMusic(); // Stop Halloween music when ThirdDemon is instantiated
- LK.setTimeout(function () {
- LK.getSound('sndDemon').play();
- }, 1000);
- };
- // Add event listener to ThirdDemon to call Function11, restart music, and destroy self on press
- // Add event listener to stage10BluePumpkin to call celebration, destroyStageElements, and instantiate ThirdDemon
- stage10BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- // Instantiate ThirdDemon in the center of the playspace
- var thirdDemon = LK.getAsset('ThirdDemon', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- thirdDemon.x = 2048 / 2;
- thirdDemon.y = 2732 / 2;
- game.addChild(thirdDemon);
- LK.stopMusic(); // Stop Halloween music when ThirdDemon is instantiated
- LK.setTimeout(function () {
- LK.getSound('sndDemon').play();
- }, 1000);
- // Add event listener to ThirdDemon to call Function11, restart music, and destroy self on press
- thirdDemon.down = function (x, y, obj) {
- Function11();
- LK.playMusic('HalloweenMusic', {
- loop: true
- });
- thirdDemon.destroy();
- };
- };
- }
- // Function11 to instantiate Stage11 and Stage11BluePumpkin
- function Function11() {
- // Instantiate Stage11 in the center of the playspace
- stage11 = LK.getAsset('Stage11', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage11.x = 2048 / 2;
- stage11.y = 2732 / 2 + 360;
- game.addChild(stage11);
- // Instantiate Stage11BluePumpkin on the playspace
- stage11BluePumpkin = LK.getAsset('Stage11BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage11BluePumpkin.x = 2048 / 2 - 640; // Example position
- stage11BluePumpkin.y = 2732 / 2 - 125; // Example position
- game.addChild(stage11BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage11BluePumpkin to call destroyStageElements and Function12 on press
- stage11BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function12();
- };
- }
- // Function12 to instantiate Stage12 and Stage12BluePumpkin
- function Function12() {
- // Instantiate Stage12 in the center of the playspace
- stage12 = LK.getAsset('Stage12', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage12.x = 2048 / 2;
- stage12.y = 2732 / 2 + 360;
- game.addChild(stage12);
- // Instantiate Stage12BluePumpkin on the playspace
- stage12BluePumpkin = LK.getAsset('Stage12BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage12BluePumpkin.x = 2048 / 2 + 575; // Example position
- stage12BluePumpkin.y = 2732 / 2 + 500; // Example position
- game.addChild(stage12BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage12BluePumpkin to call destroyStageElements and Function13 on press
- stage12BluePumpkin.down = function (x, y, obj) {
- celebration();
- destroyStageElements();
- Function13();
- };
- // Function13 to instantiate Stage13 and Stage13BluePumpkin
- function Function13() {
- // Instantiate Stage13 in the center of the playspace
- stage13 = LK.getAsset('Stage13', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage13.x = 2048 / 2;
- stage13.y = 2732 / 2 + 360;
- game.addChild(stage13);
- // Instantiate TheEnd image in the center of the playspace
- var theEnd = LK.getAsset('TheEnd', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- theEnd.x = 2048 / 2 + 50;
- theEnd.y = 2732 / 2 + 700;
- game.addChild(theEnd);
- // Instantiate Stage13BluePumpkin on the playspace
- stage13BluePumpkin = LK.getAsset('Stage13BluePumpkin', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- stage13BluePumpkin.x = 2048 / 2 - 575; // Example position
- stage13BluePumpkin.y = 2732 / 2 - 100; // Example position
- game.addChild(stage13BluePumpkin);
- game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
- // Add event listener to stage13BluePumpkin to trigger game over on press
- stage13BluePumpkin.down = function (x, y, obj) {
- LK.showGameOver(); // Trigger game over
- // Instantiate TheEnd image in the center of the playspace
- var theEnd = LK.getAsset('TheEnd', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- theEnd.x = 2048 / 2;
- theEnd.y = 2732 / 2;
- game.addChild(theEnd);
- };
- }
- }
// Add event listener to FirstDemon to call Function04, restart music, and destroy self on press
firstDemon.down = function (x, y, obj) {
Function04();
LK.playMusic('HalloweenMusic', {
@@ -629,5 +303,339 @@
});
firstDemon.destroy();
};
};
+}
+// Function04 to instantiate Stage04 and Stage04BluePumpkin
+function Function04() {
+ // Instantiate Stage04 in the center of the playspace
+ stage04 = LK.getAsset('Stage04', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 1,
+ scaleY: 1
+ });
+ stage04.x = 2048 / 2;
+ stage04.y = 2732 / 2 + 360;
+ game.addChild(stage04);
+ // Instantiate Stage04BluePumpkin on the playspace
+ stage04BluePumpkin = LK.getAsset('Stage04BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage04BluePumpkin.x = 2048 / 2 - 365; // Example position
+ stage04BluePumpkin.y = 2732 / 2 + 470; // Example position
+ game.addChild(stage04BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage04BluePumpkin to call destroyStageElements and Function05 on press
+ stage04BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function05();
+ };
+}
+// Function05 to instantiate Stage05 and Stage05BluePumpkin
+function Function05() {
+ // Instantiate Stage05 in the center of the playspace
+ stage05 = LK.getAsset('Stage05', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage05.x = 2048 / 2;
+ stage05.y = 2732 / 2 + 360;
+ game.addChild(stage05);
+ // Instantiate Stage05BluePumpkin on the playspace
+ stage05BluePumpkin = LK.getAsset('Stage05BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage05BluePumpkin.x = 2048 / 2 + 875; // Example position
+ stage05BluePumpkin.y = 2732 / 2 + 800; // Example position
+ game.addChild(stage05BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage05BluePumpkin to call destroyStageElements and Function06 on press
+ stage05BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function06();
+ };
+}
+// Function06 to instantiate Stage06 and Stage06BluePumpkin
+function Function06() {
+ // Instantiate Stage06 in the center of the playspace
+ stage06 = LK.getAsset('Stage06', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage06.x = 2048 / 2;
+ stage06.y = 2732 / 2 + 360;
+ game.addChild(stage06);
+ // Instantiate Stage06BluePumpkin on the playspace
+ stage06BluePumpkin = LK.getAsset('Stage06BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage06BluePumpkin.x = 2048 / 2 - 300; // Example position
+ stage06BluePumpkin.y = 2732 / 2 + 1000; // Example position
+ game.addChild(stage06BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage06BluePumpkin to call destroyStageElements on press
+ stage06BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function07();
+ // You can add further actions here if needed
+ };
+}
+// Function07 to instantiate Stage07 and Stage07BluePumpkin
+function Function07() {
+ // Instantiate Stage07 in the center of the playspace
+ stage07 = LK.getAsset('Stage07', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage07.x = 2048 / 2;
+ stage07.y = 2732 / 2 + 360;
+ game.addChild(stage07);
+ // Instantiate Stage07BluePumpkin on the playspace
+ stage07BluePumpkin = LK.getAsset('Stage07BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage07BluePumpkin.x = 2048 / 2 - 850; // Example position
+ stage07BluePumpkin.y = 2732 / 2 + 75; // Example position
+ game.addChild(stage07BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage07BluePumpkin to call destroyStageElements on press
+ stage07BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ // Instantiate SecondDemon in the center of the playspace
+ var secondDemon = LK.getAsset('SecondDemon', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ secondDemon.x = 2048 / 2;
+ secondDemon.y = 2732 / 2;
+ game.addChild(secondDemon);
+ LK.stopMusic(); // Stop Halloween music when SecondDemon is instantiated
+ LK.setTimeout(function () {
+ LK.getSound('sndDog').play();
+ }, 1000);
+ // Add event listener to SecondDemon to call Function08, restart music, and destroy self on press
+ secondDemon.down = function (x, y, obj) {
+ Function08();
+ LK.playMusic('HalloweenMusic', {
+ loop: true
+ });
+ secondDemon.destroy();
+ };
+ };
+}
+// Function08 to instantiate Stage08 and Stage08BluePumpkin
+function Function08() {
+ // Instantiate Stage08 in the center of the playspace
+ stage08 = LK.getAsset('Stage08', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage08.x = 2048 / 2;
+ stage08.y = 2732 / 2 + 360;
+ game.addChild(stage08);
+ // Instantiate Stage08BluePumpkin on the playspace
+ stage08BluePumpkin = LK.getAsset('Stage08BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage08BluePumpkin.x = 2048 / 2 + 500; // Example position
+ stage08BluePumpkin.y = 2732 / 2 + 1000; // Example position
+ game.addChild(stage08BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage08BluePumpkin to call destroyStageElements and Function09 on press
+ stage08BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function09();
+ };
+}
+// Function09 to instantiate Stage09 and Stage09BluePumpkin
+function Function09() {
+ // Instantiate Stage09 in the center of the playspace
+ stage09 = LK.getAsset('Stage09', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage09.x = 2048 / 2;
+ stage09.y = 2732 / 2 + 360;
+ game.addChild(stage09);
+ // Instantiate Stage09BluePumpkin on the playspace
+ stage09BluePumpkin = LK.getAsset('Stage09BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage09BluePumpkin.x = 2048 / 2 + 800; // Example position
+ stage09BluePumpkin.y = 2732 / 2 + 300; // Example position
+ game.addChild(stage09BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage09BluePumpkin to call destroyStageElements and Function10 on press
+ stage09BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function10();
+ // You can add further actions here if needed
+ };
+}
+// Function10 to instantiate Stage10 and Stage10BluePumpkin
+function Function10() {
+ // Instantiate Stage10 in the center of the playspace
+ stage10 = LK.getAsset('Stage10', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage10.x = 2048 / 2;
+ stage10.y = 2732 / 2 + 360;
+ game.addChild(stage10);
+ // Instantiate Stage10BluePumpkin on the playspace
+ stage10BluePumpkin = LK.getAsset('Stage10BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage10BluePumpkin.x = 2048 / 2 - 375; // Example position
+ stage10BluePumpkin.y = 2732 / 2 + 1100; // Example position
+ game.addChild(stage10BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage10BluePumpkin to call celebration, destroyStageElements, and instantiate ThirdDemon
+ stage10BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ // Instantiate ThirdDemon in the center of the playspace
+ var thirdDemon = LK.getAsset('ThirdDemon', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ thirdDemon.x = 2048 / 2;
+ thirdDemon.y = 2732 / 2;
+ game.addChild(thirdDemon);
+ LK.stopMusic(); // Stop Halloween music when ThirdDemon is instantiated
+ LK.setTimeout(function () {
+ LK.getSound('sndDemon').play();
+ }, 1000);
+ };
+ // Add event listener to ThirdDemon to call Function11, restart music, and destroy self on press
+ // Add event listener to stage10BluePumpkin to call celebration, destroyStageElements, and instantiate ThirdDemon
+ stage10BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ // Instantiate ThirdDemon in the center of the playspace
+ var thirdDemon = LK.getAsset('ThirdDemon', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ thirdDemon.x = 2048 / 2;
+ thirdDemon.y = 2732 / 2;
+ game.addChild(thirdDemon);
+ LK.stopMusic(); // Stop Halloween music when ThirdDemon is instantiated
+ LK.setTimeout(function () {
+ LK.getSound('sndDemon').play();
+ }, 1000);
+ // Add event listener to ThirdDemon to call Function11, restart music, and destroy self on press
+ thirdDemon.down = function (x, y, obj) {
+ Function11();
+ LK.playMusic('HalloweenMusic', {
+ loop: true
+ });
+ thirdDemon.destroy();
+ };
+ };
+}
+// Function11 to instantiate Stage11 and Stage11BluePumpkin
+function Function11() {
+ // Instantiate Stage11 in the center of the playspace
+ stage11 = LK.getAsset('Stage11', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage11.x = 2048 / 2;
+ stage11.y = 2732 / 2 + 360;
+ game.addChild(stage11);
+ // Instantiate Stage11BluePumpkin on the playspace
+ stage11BluePumpkin = LK.getAsset('Stage11BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage11BluePumpkin.x = 2048 / 2 - 640; // Example position
+ stage11BluePumpkin.y = 2732 / 2 - 125; // Example position
+ game.addChild(stage11BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage11BluePumpkin to call destroyStageElements and Function12 on press
+ stage11BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function12();
+ };
+}
+// Function12 to instantiate Stage12 and Stage12BluePumpkin
+function Function12() {
+ // Instantiate Stage12 in the center of the playspace
+ stage12 = LK.getAsset('Stage12', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage12.x = 2048 / 2;
+ stage12.y = 2732 / 2 + 360;
+ game.addChild(stage12);
+ // Instantiate Stage12BluePumpkin on the playspace
+ stage12BluePumpkin = LK.getAsset('Stage12BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage12BluePumpkin.x = 2048 / 2 + 575; // Example position
+ stage12BluePumpkin.y = 2732 / 2 + 500; // Example position
+ game.addChild(stage12BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage12BluePumpkin to call destroyStageElements and Function13 on press
+ stage12BluePumpkin.down = function (x, y, obj) {
+ celebration();
+ destroyStageElements();
+ Function13();
+ };
+}
+// Function13 to instantiate Stage13 and Stage13BluePumpkin
+function Function13() {
+ // Instantiate Stage13 in the center of the playspace
+ stage13 = LK.getAsset('Stage13', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage13.x = 2048 / 2;
+ stage13.y = 2732 / 2 + 360;
+ game.addChild(stage13);
+ // Instantiate TheEnd image in the center of the playspace
+ var theEnd = LK.getAsset('TheEnd', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ theEnd.x = 2048 / 2 + 50;
+ theEnd.y = 2732 / 2 + 700;
+ game.addChild(theEnd);
+ // Instantiate Stage13BluePumpkin on the playspace
+ stage13BluePumpkin = LK.getAsset('Stage13BluePumpkin', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ stage13BluePumpkin.x = 2048 / 2 - 575; // Example position
+ stage13BluePumpkin.y = 2732 / 2 - 100; // Example position
+ game.addChild(stage13BluePumpkin);
+ game.addChild(gripDemon); // Re-add GripDemon to ensure it stays on top
+ // Add event listener to stage13BluePumpkin to trigger game over on press
+ stage13BluePumpkin.down = function (x, y, obj) {
+ LK.showGameOver(); // Trigger game over
+ // Instantiate TheEnd image in the center of the playspace
+ var theEnd = LK.getAsset('TheEnd', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ theEnd.x = 2048 / 2;
+ theEnd.y = 2732 / 2;
+ game.addChild(theEnd);
+ };
}
\ No newline at end of file
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
yellow star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon old splintered wood background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
demon goat staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark cartoon cloudy skies high quality background make it simple and minimalistic.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
demon dog staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish lake environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish lake environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
scary demon staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an orange halloween pumpkin with glasses Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
button that says relax in orange, black outline of the letters. high contrast. has a pumpkin on it Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
button that says race in orange, black outline of the letters. high contrast. has a pumpkin on it square button with rounded corners Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. png background
coming soon letters in white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Round Black Ellipse with a Transparent Hole in the Middle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.