===================================================================
--- 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;