Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: particlesArray is not defined' in or related to this line: 'particlesArray.push(star);' Line Number: 311
Code edit (5 edits merged)
Please save this source code
User prompt
make an explosions of small stars when player hits the collectible
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: floor is not defined' in or related to this line: 'floor.move();' Line Number: 250
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Remix started
Copy GPT Dash!
===================================================================
--- original.js
+++ change.js
@@ -124,19 +124,20 @@
});
var NightBackground = Container.expand(function () {
var self = Container.call(this);
self.attachAsset('nightBackground', {
- width: 2048,
- height: 2732,
- anchorX: 0,
+ width: 2048 * 1.2,
+ height: 2732 * 1.2,
+ anchorX: 0.1,
anchorY: 0
});
- self.move = function () {
- self.x -= game.speed;
- if (self.x <= -2048) {
- self.x = 0;
- }
- };
+ /* self.move = function () {
+ self.x -= game.speed;
+ if (self.x <= -2048) {
+ self.x = 0;
+ }
+ };
+ */
});
var Pterodactyl = Container.expand(function () {
var self = Container.call(this);
var pterodactylGraphics = self.attachAsset('pterodactyl', {
@@ -186,14 +187,14 @@
});
scoreTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(scoreTxt);
var ground1 = game.addChild(new Ground());
-ground1.y = 2732 - ground1.height; // Align with the bottom of the playspace
+ground1.y = 2732 - 200; //ground1.height; // Align with the bottom of the playspace
var ground2 = game.addChild(new Ground());
ground2.x = ground1.width;
-ground2.y = 2732 - ground2.height; // Align with the bottom of the playspace
+ground2.y = 2732 - 200; //ground2.height; // Align with the bottom of the playspace
game.speed = 5;
-game.floorLevel = 2732 - 200; // Dinosaur stands on the floor
+game.floorLevel = 2732 - 90; // Dinosaur stands on the floor
game.score = 0;
game.obstacles = [];
var dinosaur = game.addChild(new Dinosaur());
dinosaur.x = 300;