More wandering sprite work

This commit is contained in:
2014-06-11 21:39:51 -07:00
parent 1ecd9bb6ab
commit d90d1b9591

View File

@@ -313,7 +313,7 @@ GameState.prototype.create = function()
this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height); this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height);
// drop this lower to make the map darker // drop this lower to make the map darker
this.shadowTextureColor = 'rgb(30, 30, 30)'; this.shadowTextureColor = 'rgb(255, 255, 255)';
// Create an object that will use the bitmap as a texture // Create an object that will use the bitmap as a texture
this.shadowSprite = game.add.image(0, 0, this.shadowTexture); this.shadowSprite = game.add.image(0, 0, this.shadowTexture);
@@ -324,22 +324,22 @@ GameState.prototype.create = function()
// Create the lights // Create the lights
this.staticLights = game.add.group(); this.staticLights = game.add.group();
for (i = 0; i < 20 ; i++ ) { // for (i = 0; i < 20 ; i++ ) {
this.staticLights.add( // this.staticLights.add(
new Light(game, // new Light(game,
game.rnd.integerInRange(0, game.width), // game.rnd.integerInRange(0, game.width),
game.rnd.integerInRange(0, game.height), // game.rnd.integerInRange(0, game.height),
game.rnd.integerInRange(0, 128), // game.rnd.integerInRange(0, 128),
game.rnd.realInRange(0.0, 1.0), // game.rnd.realInRange(0.0, 1.0),
[ // [
game.rnd.integerInRange(0, 255), // game.rnd.integerInRange(0, 255),
game.rnd.integerInRange(0, 255), // game.rnd.integerInRange(0, 255),
game.rnd.integerInRange(0, 255) // game.rnd.integerInRange(0, 255)
], // ],
flicker = [true, false][game.rnd.integerInRange(0, 1)] // flicker = [true, false][game.rnd.integerInRange(0, 1)]
) // )
); // );
} // }
//this.movingLight = new Light(game, game.width/2, game.height/2); //this.movingLight = new Light(game, game.width/2, game.height/2);
//this.lights.add(this.movingLight); //this.lights.add(this.movingLight);
} }