User prompt
Asteroids cant spwan in a 200 pixel radius from where lander spawns
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'for (var i = 0; i < asteroids.length; i++) {' Line Number: 203
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'for (var i = 0; i < asteroids.length; i++) {' Line Number: 203
User prompt
If lander intersect asteroid then game over
User prompt
Create a new asteroid class. Asteroids will spawn from the top of the screen and move diagonaly to the bottom of the screen
User prompt
After platform.checklanding(lamder) is true, add a 1 second pause before excuting anything in the if clause
User prompt
When lander lands succesfully, stop the game for 1 second, to show the succesfull.land, before next level starts
User prompt
On intersection of lander and platform, wait for one second after lander respawn
User prompt
When lander lands succesfully leave lander attached to the platform for 1 second on the landing position before starting next level
User prompt
Move thruster 20 pixela close to lander
User prompt
Move thruster 40 pixels closer to lander
User prompt
Move thruster 4 pixels higher
User prompt
Thruster should only be displayed when lander isnthrusting
User prompt
Thrustee should be displayed 5 pixels below the lander. But it is not a part of the lander object
User prompt
Add a new thruster class that is not related to the lander
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'intersects')' in this line: 'if (lander.landerGraphics.intersects(self)) {' Line Number: 64
User prompt
Lander intersect with platform, not the thruster.
User prompt
Thruater should not be considered a part of the lander for interections
User prompt
Thruster and platform do not intersect
User prompt
Remove collision between platform and thruater
User prompt
When lander lands stop moving for half a second
User prompt
After lander succesfully lands pause the game for one second. All assets should stop moving. Then evertthing shpuld continue as usual
User prompt
Only show thruster when player is thruating
User prompt
Move thruster 50 pixela down
User prompt
Move thruster 50 pixela down from current lander positiin
===================================================================
--- original.js
+++ change.js
@@ -38,11 +38,9 @@
thruster.visible = self.isThrusting;
};
self.land = function () {
self.isLanding = true;
- LK.setTimeout(function () {
- levelManager.incrementLevel();
- }, 1000);
+ levelManager.incrementLevel();
};
self.refuel = function () {
self.fuel = 1000;
fuelTxt.setText(self.fuel.toString() + ' Fuel'); // Update fuel display
@@ -177,12 +175,15 @@
lander.land();
score += 1;
scoreTxt.setText(score.toString());
lander.refuel();
- lander.x = 1024;
- lander.y = 100;
- lander.speedY = 0;
- lander.isLanding = false;
+ // Delay lander respawn
+ LK.setTimeout(function () {
+ lander.x = 1024;
+ lander.y = 100;
+ lander.speedY = 0;
+ lander.isLanding = false;
+ }, 1000);
}
// Check for game over conditions
if (lander.y > 2732) {