More wandering sprite work

This commit is contained in:
2014-06-11 21:26:31 -07:00
parent 882c8a60c1
commit 5e52eaf554

View File

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