===================================================================
--- original.js
+++ change.js
@@ -591,8 +591,27 @@
;
buildTextAssets(text);
return self;
});
+var Starfield = Container.expand(function (config) {
+ var self = Container.call(this);
+ config = config || {};
+ var starCount = config.starCount || 100;
+ var starColor = config.starColor || 0xFFFFFF;
+ var starSize = config.starSize || 2;
+ for (var i = 0; i < starCount; i++) {
+ var star = self.attachAsset('circle', {
+ width: starSize,
+ height: starSize,
+ color: starColor,
+ x: Math.random() * GAME_WIDTH,
+ y: Math.random() * GAME_HEIGHT,
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ }
+ return self;
+});
/****
* Initialize Game
****/
@@ -685,8 +704,13 @@
var gameOver = false;
var distanceRemaining = SCORE_TOTAL_DISTANCE;
;
// Instances
+var starfield = game.addChild(new Starfield({
+ starCount: 200,
+ starColor: 0xFFFFFF,
+ starSize: 2
+}));
var sun = game.addChild(new Sun({
x: GAME_WIDTH / 2,
y: 50
}));
white
circle sliced into many pieces, flat image. 2d, white background, shadowless.
pixel art of a tall, tree. game asset, 2d, white background, shadowless.
pixel art cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark space.
flying lava bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bonus crystal ball with the recycle symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
top view A green round start button empty in the center like a ring.