User prompt
Please fix the bug: 'skipButton is not defined' in or related to this line: 'skipButton.down = function (x, y, obj) {' Line Number: 439
User prompt
Add cell Cutscene before title scene ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Before flyby starts moving in add cell to titlescreen
User prompt
Move alien head down 10
User prompt
When fireballs naturally complete their lifecycle (hit enemy, go off-screen, etc.), remove them from their parent tower's fireballs array to prevent memory leaks.
User prompt
Modify the existing tower destruction logic to iterate through `tower.fireballs`, stop each fireball's movement interval using `LK.clearInterval()`, and destroy each fireball object.
User prompt
When a fire tower creates a fireball, push both the fireball object AND its interval timer to the tower's fireballs array. This creates a direct ownership relationship
User prompt
Fix this please
User prompt
When creating a fire tower, add a `tower.fireballs = []` property to store references to all fireballs launched by that tower.
User prompt
Play probedroid2 sound once first drone appears in level1 wave2
User prompt
Play probedroid2 sound once first drone appears in level1 wave2
User prompt
Play probedroid sound once when first probedroid appears in level1 wave 1
User prompt
Play probedroid sound when level1 wave1 starts
User prompt
Play fireball sound when fireballs are fired
User prompt
Stop music when flyby leaves backdrop scene
User prompt
Don't stop music at wave1
User prompt
Add electric sound to play when electric tower uses zap effect
User prompt
Play fart sound when dog shoots gas cloud
User prompt
Use explosion effect when towers are destroyed
User prompt
Play confirm sound when green tick is clicked
User prompt
Play explosion sound when tower is destroyed
User prompt
Play explosion sounds when the explosion asset is used
User prompt
Initialise sounds
User prompt
Please fix
User prompt
Make flying aliens spawn every 10 seconds in level2 wave 4
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Defense class var Defense = Container.expand(function () { var self = Container.call(this); var defenseGraphics = self.attachAsset('defense', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Defense logic goes here }; }); // Enemy class var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.3, scaleY: 0.3 }); // Add number text self.numberText = new Text2('1', { size: 60, fill: 0x000000 }); self.numberText.anchor.set(0.5, 0.5); self.numberText.x = 0; self.numberText.y = 0; self.addChild(self.numberText); // Add health bar var healthBarOutline = self.attachAsset('healthBarOutline', { anchorX: 0.5, anchorY: 0.5, x: 0, y: -100 }); var healthBar = self.attachAsset('healthBar', { anchorX: 0.5, anchorY: 0.5, x: 0, y: -100, tint: 0x00ff00 }); self.updateHealthBar = function () { var healthPercentage = self.health / self.maxHealth; healthBar.scaleX = healthPercentage; // Change color based on health if (healthPercentage > 0.6) { healthBar.tint = 0x00ff00; // Green } else if (healthPercentage > 0.3) { healthBar.tint = 0xffff00; // Yellow } else { healthBar.tint = 0xff0000; // Red } }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.health = 0; } self.updateHealthBar(); }; self.update = function () { // Initialize lastX if not set if (self.lastX === undefined) self.lastX = self.x; // Update health bar self.updateHealthBar(); }; return self; }); // Assets will be automatically created and loaded by the LK engine // Tower class var Tower = Container.expand(function () { var self = Container.call(this); var towerGraphics = self.attachAsset('tower', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Tower logic goes here }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Game update loop game.update = function () { if (!gameStarted) return; // Spawn enemies enemySpawnTimer++; if (enemySpawnTimer >= enemySpawnInterval) { spawnEnemy(); enemySpawnTimer = 0; } // Update enemies updateEnemies(); // Check win condition if (enemiesSpawned >= maxEnemiesInWave && enemies.length === 0) { LK.showYouWin(); } }; var enemies = []; var towers = []; var gameStarted = false; var enemySpawnTimer = 0; var enemySpawnInterval = 120; // Spawn every 2 seconds at 60fps var enemiesSpawned = 0; var maxEnemiesInWave = 10; // Wave 1 has exactly 10 enemies // Tower defense functions function startTowerDefenseWave1() { gameStarted = true; enemySpawnTimer = 0; enemiesSpawned = 0; } function spawnEnemy() { if (enemiesSpawned >= maxEnemiesInWave) return; var enemy = game.addChild(new Enemy()); // Position enemy at the right side of the screen enemy.x = 2048 - 50; // Start from right side enemy.y = 2732 / 7 + 600; // First guideline position enemy.health = 100; enemy.maxHealth = 100; enemy.speed = -2; // Negative speed to move left enemy.pathIndex = 0; enemy.lastPathIndex = -1; // Set enemy number enemy.numberText.setText((enemiesSpawned + 1).toString()); enemies.push(enemy); enemiesSpawned++; } function updateEnemies() { for (var i = enemies.length - 1; i >= 0; i--) { var enemy = enemies[i]; // Move enemy using its speed (negative for left movement) enemy.x += enemy.speed; // Check if enemy reached the left side of the screen if (enemy.lastX >= 0 && enemy.x < 0) { // Enemy reached the left side - remove it enemy.destroy(); enemies.splice(i, 1); continue; } // Update last position for next frame enemy.lastX = enemy.x; } } // Start with cell cutscene var cellImage = game.addChild(LK.getAsset('cell', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 })); // Fade in cell image tween(cellImage, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Keep cell visible for 3 seconds LK.setTimeout(function () { // Fade out cell tween(cellImage, { alpha: 0 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { cellImage.destroy(); // Now display the title showTitleScene(); } }); }, 3000); } }); // Function to show title scene function showTitleScene() { // Display the title // Import tween plugin var titleImage = game.addChild(LK.getAsset('Title', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 1400 })); // Add skip intro button to top of title screen var skipButton = new Text2('SKIP INTRO', { size: 60, fill: 0xFFFFFF }); skipButton.x = 2048 / 2; skipButton.y = 150; game.addChild(skipButton); // Add flyby asset to title - start at right side of screen var flybyImage = game.addChild(LK.getAsset('Flyby', { anchorX: 0.5, anchorY: 0.5, x: 2048 + 375, y: 2732 / 2 + 1400 - 500 })); // Add touch event to skip button skipButton.down = function (x, y, obj) { skipToBackdrop(); }; // Store the original Y position for flyby var flybyOriginalY = flybyImage.y; // Create hover animation function function startFlybyHover() { // Tween up 50 pixels over 2 seconds tween(flybyImage, { y: flybyOriginalY - 50 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Tween down 50 pixels over 2 seconds tween(flybyImage, { y: flybyOriginalY + 50 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Start the cycle again startFlybyHover(); } }); } }); } // Start the hover animation startFlybyHover(); // Start flyby movement from right to left tween(flybyImage, { x: -375 }, { duration: 8000, easing: tween.linear, onFinish: function onFinish() { // After flyby has left the screen, slowly scroll title up tween(titleImage, { y: titleImage.y - titleImage.height }, { duration: 20000, easing: tween.easeOut }); // Stop the title scrolling after 5 seconds LK.setTimeout(function () { tween.stop(titleImage, { y: true }); // Fade in intro asset in the middle of the screen var introAsset = game.addChild(LK.getAsset('intro', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 })); // Tween alpha from 0 to 1 for fade-in effect tween(introAsset, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // After intro has faded in, make flyby move from left to right flybyImage.x = -375; // Reset flyby to left side flybyImage.y = 2732 / 2; // Center vertically tween(flybyImage, { x: 2048 + 375 }, { duration: 6000, easing: tween.linear, onFinish: function onFinish() { // After flyby has left the screen, fade out intro and fade in backdrop tween(introAsset, { alpha: 0 }, { duration: 2000, easing: tween.easeInOut }); // Add backdrop asset to game var backdropAsset = game.addChild(LK.getAsset('backdrop', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0, scaleX: 0.5, scaleY: 0.5 })); // Add flyby asset to backdrop var backdropFlyby = game.addChild(LK.getAsset('Flyby', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 800, alpha: 0, scaleX: 0.8, scaleY: 0.8 })); // Store the original Y position for backdrop flyby var backdropFlybyOriginalY = backdropFlyby.y; // Make flyby move off the right side of backdrop scene function startBackdropFlybyHover() { tween(backdropFlyby, { x: 2048 + 375 }, { duration: 6000, easing: tween.linear, onFinish: function onFinish() { // After flyby has left the backdrop scene, fade in wave1 asset var wave1Asset = game.addChild(LK.getAsset('Wave1', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 })); // Fade in wave1 asset tween(wave1Asset, { alpha: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { // Keep wave1 visible for 3 seconds then fade out LK.setTimeout(function () { tween(wave1Asset, { alpha: 0 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { wave1Asset.destroy(); // Start first wave of tower defense game startTowerDefenseWave1(); } }); }, 3000); } }); } }); } // Fade in backdrop tween(backdropAsset, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Fade in backdrop flyby tween(backdropFlyby, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Start flyby movement to right side after fade in startBackdropFlybyHover(); } }); // Add 6 horizontal guide lines after backdrop fades in var lineSpacing = 2732 / 7; // Divide screen height by 7 to get 6 lines with margins for (var i = 1; i <= 6; i++) { var yPosition = lineSpacing * i; if (i === 1) { yPosition += 600; // Move guideline 1 down by 600 pixels } else if (i === 2) { yPosition += 420; // Move guideline 2 down by 420 pixels } else if (i === 3) { yPosition += 250; // Move guideline 3 down by 250 pixels } else if (i === 4) { yPosition += 120; // Move guideline 4 down by 120 pixels } else if (i === 5) { yPosition -= 50; // Move guideline 5 up by 50 pixels } else if (i === 6) { yPosition -= 200; // Move guideline 6 up by 200 pixels } var guideLine = game.addChild(LK.getAsset('guideLine', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: yPosition, alpha: 0.5 })); } } }); } }); } }); }, 5000); } }); } // Function to skip directly to backdrop scene function skipToBackdrop() { // Stop all tweens tween.stop(titleImage); tween.stop(flybyImage); // Remove title and flyby titleImage.destroy(); flybyImage.destroy(); skipButton.destroy(); // Add backdrop asset to game var backdropAsset = game.addChild(LK.getAsset('backdrop', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 1, scaleX: 0.5, scaleY: 0.5 })); // Add flyby asset to backdrop var backdropFlyby = game.addChild(LK.getAsset('Flyby', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 800, alpha: 1, scaleX: 0.8, scaleY: 0.8 })); // Store the original Y position for backdrop flyby var backdropFlybyOriginalY = backdropFlyby.y; // Make flyby move off the right side of backdrop scene tween(backdropFlyby, { x: 2048 + 375 }, { duration: 6000, easing: tween.linear, onFinish: function onFinish() { // After flyby has left the backdrop scene, fade in wave1 asset var wave1Asset = game.addChild(LK.getAsset('Wave1', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 })); // Fade in wave1 asset tween(wave1Asset, { alpha: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { // Keep wave1 visible for 3 seconds then fade out LK.setTimeout(function () { tween(wave1Asset, { alpha: 0 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { wave1Asset.destroy(); // Start first wave of tower defense game startTowerDefenseWave1(); } }); }, 3000); } }); } }); // Add 6 horizontal guide lines immediately var lineSpacing = 2732 / 7; for (var i = 1; i <= 6; i++) { var yPosition = lineSpacing * i; if (i === 1) { yPosition += 600; // Move guideline 1 down by 600 pixels } else if (i === 2) { yPosition += 420; // Move guideline 2 down by 420 pixels } else if (i === 3) { yPosition += 250; // Move guideline 3 down by 250 pixels } else if (i === 4) { yPosition += 120; // Move guideline 4 down by 120 pixels } else if (i === 5) { yPosition -= 50; // Move guideline 5 up by 50 pixels } else if (i === 6) { yPosition -= 200; // Move guideline 6 up by 200 pixels } var guideLine = game.addChild(LK.getAsset('guideLine', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: yPosition, alpha: 0.5 })); } } ;
===================================================================
--- original.js
+++ change.js
@@ -209,9 +209,212 @@
});
skipButton.x = 2048 / 2;
skipButton.y = 150;
game.addChild(skipButton);
+ // Add flyby asset to title - start at right side of screen
+ var flybyImage = game.addChild(LK.getAsset('Flyby', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 + 375,
+ y: 2732 / 2 + 1400 - 500
+ }));
// Add touch event to skip button
+ skipButton.down = function (x, y, obj) {
+ skipToBackdrop();
+ };
+ // Store the original Y position for flyby
+ var flybyOriginalY = flybyImage.y;
+ // Create hover animation function
+ function startFlybyHover() {
+ // Tween up 50 pixels over 2 seconds
+ tween(flybyImage, {
+ y: flybyOriginalY - 50
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Tween down 50 pixels over 2 seconds
+ tween(flybyImage, {
+ y: flybyOriginalY + 50
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Start the cycle again
+ startFlybyHover();
+ }
+ });
+ }
+ });
+ }
+ // Start the hover animation
+ startFlybyHover();
+ // Start flyby movement from right to left
+ tween(flybyImage, {
+ x: -375
+ }, {
+ duration: 8000,
+ easing: tween.linear,
+ onFinish: function onFinish() {
+ // After flyby has left the screen, slowly scroll title up
+ tween(titleImage, {
+ y: titleImage.y - titleImage.height
+ }, {
+ duration: 20000,
+ easing: tween.easeOut
+ });
+ // Stop the title scrolling after 5 seconds
+ LK.setTimeout(function () {
+ tween.stop(titleImage, {
+ y: true
+ });
+ // Fade in intro asset in the middle of the screen
+ var introAsset = game.addChild(LK.getAsset('intro', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2,
+ alpha: 0
+ }));
+ // Tween alpha from 0 to 1 for fade-in effect
+ tween(introAsset, {
+ alpha: 1
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // After intro has faded in, make flyby move from left to right
+ flybyImage.x = -375; // Reset flyby to left side
+ flybyImage.y = 2732 / 2; // Center vertically
+ tween(flybyImage, {
+ x: 2048 + 375
+ }, {
+ duration: 6000,
+ easing: tween.linear,
+ onFinish: function onFinish() {
+ // After flyby has left the screen, fade out intro and fade in backdrop
+ tween(introAsset, {
+ alpha: 0
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut
+ });
+ // Add backdrop asset to game
+ var backdropAsset = game.addChild(LK.getAsset('backdrop', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2,
+ alpha: 0,
+ scaleX: 0.5,
+ scaleY: 0.5
+ }));
+ // Add flyby asset to backdrop
+ var backdropFlyby = game.addChild(LK.getAsset('Flyby', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2 - 800,
+ alpha: 0,
+ scaleX: 0.8,
+ scaleY: 0.8
+ }));
+ // Store the original Y position for backdrop flyby
+ var backdropFlybyOriginalY = backdropFlyby.y;
+ // Make flyby move off the right side of backdrop scene
+ function startBackdropFlybyHover() {
+ tween(backdropFlyby, {
+ x: 2048 + 375
+ }, {
+ duration: 6000,
+ easing: tween.linear,
+ onFinish: function onFinish() {
+ // After flyby has left the backdrop scene, fade in wave1 asset
+ var wave1Asset = game.addChild(LK.getAsset('Wave1', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2,
+ alpha: 0
+ }));
+ // Fade in wave1 asset
+ tween(wave1Asset, {
+ alpha: 1
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Keep wave1 visible for 3 seconds then fade out
+ LK.setTimeout(function () {
+ tween(wave1Asset, {
+ alpha: 0
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ wave1Asset.destroy();
+ // Start first wave of tower defense game
+ startTowerDefenseWave1();
+ }
+ });
+ }, 3000);
+ }
+ });
+ }
+ });
+ }
+ // Fade in backdrop
+ tween(backdropAsset, {
+ alpha: 1
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Fade in backdrop flyby
+ tween(backdropFlyby, {
+ alpha: 1
+ }, {
+ duration: 2000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Start flyby movement to right side after fade in
+ startBackdropFlybyHover();
+ }
+ });
+ // Add 6 horizontal guide lines after backdrop fades in
+ var lineSpacing = 2732 / 7; // Divide screen height by 7 to get 6 lines with margins
+ for (var i = 1; i <= 6; i++) {
+ var yPosition = lineSpacing * i;
+ if (i === 1) {
+ yPosition += 600; // Move guideline 1 down by 600 pixels
+ } else if (i === 2) {
+ yPosition += 420; // Move guideline 2 down by 420 pixels
+ } else if (i === 3) {
+ yPosition += 250; // Move guideline 3 down by 250 pixels
+ } else if (i === 4) {
+ yPosition += 120; // Move guideline 4 down by 120 pixels
+ } else if (i === 5) {
+ yPosition -= 50; // Move guideline 5 up by 50 pixels
+ } else if (i === 6) {
+ yPosition -= 200; // Move guideline 6 up by 200 pixels
+ }
+ var guideLine = game.addChild(LK.getAsset('guideLine', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: yPosition,
+ alpha: 0.5
+ }));
+ }
+ }
+ });
+ }
+ });
+ }
+ });
+ }, 5000);
+ }
+ });
}
// Function to skip directly to backdrop scene
function skipToBackdrop() {
// Stop all tweens
@@ -308,209 +511,5 @@
alpha: 0.5
}));
}
}
-// Add touch event to skip button
-skipButton.down = function (x, y, obj) {
- skipToBackdrop();
-};
-// Add flyby asset to title - start at right side of screen
-var flybyImage = game.addChild(LK.getAsset('Flyby', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 + 375,
- y: 2732 / 2 + 1400 - 500
-}));
-// Store the original Y position for flyby
-var flybyOriginalY = flybyImage.y;
-// Create hover animation function
-function startFlybyHover() {
- // Tween up 50 pixels over 2 seconds
- tween(flybyImage, {
- y: flybyOriginalY - 50
- }, {
- duration: 2000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // Tween down 50 pixels over 2 seconds
- tween(flybyImage, {
- y: flybyOriginalY + 50
- }, {
- duration: 2000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // Start the cycle again
- startFlybyHover();
- }
- });
- }
- });
-}
-// Start the hover animation
-startFlybyHover();
-// Start flyby movement from right to left
-tween(flybyImage, {
- x: -375
-}, {
- duration: 8000,
- easing: tween.linear,
- onFinish: function onFinish() {
- // After flyby has left the screen, slowly scroll title up
- tween(titleImage, {
- y: titleImage.y - titleImage.height
- }, {
- duration: 20000,
- easing: tween.easeOut
- });
- // Stop the title scrolling after 5 seconds
- LK.setTimeout(function () {
- tween.stop(titleImage, {
- y: true
- });
- // Fade in intro asset in the middle of the screen
- var introAsset = game.addChild(LK.getAsset('intro', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2,
- alpha: 0
- }));
- // Tween alpha from 0 to 1 for fade-in effect
- tween(introAsset, {
- alpha: 1
- }, {
- duration: 2000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // After intro has faded in, make flyby move from left to right
- flybyImage.x = -375; // Reset flyby to left side
- flybyImage.y = 2732 / 2; // Center vertically
- tween(flybyImage, {
- x: 2048 + 375
- }, {
- duration: 6000,
- easing: tween.linear,
- onFinish: function onFinish() {
- // After flyby has left the screen, fade out intro and fade in backdrop
- tween(introAsset, {
- alpha: 0
- }, {
- duration: 2000,
- easing: tween.easeInOut
- });
- // Add backdrop asset to game
- var backdropAsset = game.addChild(LK.getAsset('backdrop', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2,
- alpha: 0,
- scaleX: 0.5,
- scaleY: 0.5
- }));
- // Add flyby asset to backdrop
- var backdropFlyby = game.addChild(LK.getAsset('Flyby', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2 - 800,
- alpha: 0,
- scaleX: 0.8,
- scaleY: 0.8
- }));
- // Store the original Y position for backdrop flyby
- var backdropFlybyOriginalY = backdropFlyby.y;
- // Make flyby move off the right side of backdrop scene
- function startBackdropFlybyHover() {
- tween(backdropFlyby, {
- x: 2048 + 375
- }, {
- duration: 6000,
- easing: tween.linear,
- onFinish: function onFinish() {
- // After flyby has left the backdrop scene, fade in wave1 asset
- var wave1Asset = game.addChild(LK.getAsset('Wave1', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2,
- alpha: 0
- }));
- // Fade in wave1 asset
- tween(wave1Asset, {
- alpha: 1
- }, {
- duration: 1000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // Keep wave1 visible for 3 seconds then fade out
- LK.setTimeout(function () {
- tween(wave1Asset, {
- alpha: 0
- }, {
- duration: 1000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- wave1Asset.destroy();
- // Start first wave of tower defense game
- startTowerDefenseWave1();
- }
- });
- }, 3000);
- }
- });
- }
- });
- }
- // Fade in backdrop
- tween(backdropAsset, {
- alpha: 1
- }, {
- duration: 2000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // Fade in backdrop flyby
- tween(backdropFlyby, {
- alpha: 1
- }, {
- duration: 2000,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- // Start flyby movement to right side after fade in
- startBackdropFlybyHover();
- }
- });
- // Add 6 horizontal guide lines after backdrop fades in
- var lineSpacing = 2732 / 7; // Divide screen height by 7 to get 6 lines with margins
- for (var i = 1; i <= 6; i++) {
- var yPosition = lineSpacing * i;
- if (i === 1) {
- yPosition += 600; // Move guideline 1 down by 600 pixels
- } else if (i === 2) {
- yPosition += 420; // Move guideline 2 down by 420 pixels
- } else if (i === 3) {
- yPosition += 250; // Move guideline 3 down by 250 pixels
- } else if (i === 4) {
- yPosition += 120; // Move guideline 4 down by 120 pixels
- } else if (i === 5) {
- yPosition -= 50; // Move guideline 5 up by 50 pixels
- } else if (i === 6) {
- yPosition -= 200; // Move guideline 6 up by 200 pixels
- }
- var guideLine = game.addChild(LK.getAsset('guideLine', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: yPosition,
- alpha: 0.5
- }));
- }
- }
- });
- }
- });
- }
- });
- }, 5000);
- }
-});
;
\ No newline at end of file
White circle with two eyes, seen from above.. In-Game asset. 2d. High contrast. No shadows
White simple circular enemy seen from above, black outline. Black eyes, with a single shield in-font of it. Black and white only. Blue background.
White circle with black outline. Blue background.. In-Game asset. 2d. High contrast. No shadows
Fire hydrant. In-Game asset. 2d. High contrast. No shadows
Water spraying forward In-Game asset. 2d. High contrast. No shadows
Fan blades symmetrical. In-Game asset. 2d. High contrast. No shadows
Plasma ball. In-Game asset. 2d. High contrast. No shadows
Make picture transparent
Bug zapper on a pole. In-Game asset. 2d. High contrast. No shadows
Probe droid. In-Game asset. 2d. High contrast. No shadows
Space drone. In-Game asset. 2d. High contrast. No shadows
Remove propellers and make them symmetrical
Add more rows to gris
Make this picture with more night sky above the city skyline
Change text to say wave 1
Make button grey and say ??????
Make it say Wave 2
Make it say wave 3
Make it say wave 4
WiFi symbol. In-Game asset. 2d. High contrast. No shadows
explosion effect In-Game asset. 2d. High contrast. No shadows
Make it say wave 5
Remove laser beam
Make button hot pink and say 'Reflect $20'
Make button blue and change text to say 'Water $10' in a retro style font
Make button green and change test to say 'Gas $20'
Make button orange and change test to say 'Fire $40'
Make button very light blue and change test to say 'Air $30'
Make button gold and change text to say 'Electric $50'
Make button purple and change test to say 'Plasma $60'
Make button Teal and change test to say 'Slingshot $100'
Make button silver and change test to say 'WiFi $150'
Remove little kick so it's just a smooth oval shape
Make grid 6x8
Hand should be holding the gun by the Handle
Place laser cannon in both hands holding it like a shotgun
Make it stand still
Remove the words 5g
Make sure spelling in speech bubble is correct "We have found the earthlings weakness"
Fix the spelling of the word Planet
Slingshot. In-Game asset. 2d. High contrast. No shadows
Red button with a 'X' on it. In-Game asset. 2d. High contrast. No shadows
Green button with a tick on it
Fix the spelling of word saw
Display icon that says score sci fi comic style font. In-Game asset. 2d. High contrast. No shadows
Display icon that says cash sci fi comic style font. In-Game asset. 2d. High contrast. No shadows
Display icon that says X2 speed sci fi comic style font. In-Game asset. 2d. High contrast. No shadows
Make it say x1 speed and make the x1 blue
Canvasser
Sound effect
Alien1
Sound effect
Alien2
Sound effect
Alien3
Sound effect
Intro
Music
Probedroid
Sound effect
Probedroid2
Sound effect
Towerselect
Sound effect
Water
Sound effect
Explosion
Sound effect
Confirm
Sound effect
Fart
Sound effect
Electric
Sound effect
Fireball
Sound effect