Testing simultaneous lights on screen

This commit is contained in:
Andrew Kesterson
2014-06-11 10:52:27 -07:00
parent 2cc3a08aa5
commit 08f6ddb73f

View File

@@ -231,11 +231,15 @@ GameState.prototype.create = function()
// Create the lights // Create the lights
this.lights = game.add.group(); this.lights = game.add.group();
for (i = 0; i < 20 ; i++ ) { for (i = 0; i < 20 ; i++ ) {
this.lights.add(Torch(game, game.rnd.integerInRange(0, game.width), game.rnd.integerInRange(1,game.height))); this.lights.add(
Torch(game,
game.rnd.integerInRange(0, game.width),
game.rnd.integerInRange(0, game.heighh)
)
);
} }
this.movingLight = new Torch(game, game.width/2, game.height/2); this.movingLight = new Torch(game, game.width/2, game.height/2);
this.lights.add(this.movingLight); this.lights.add(this.movingLight);
} }
GameState.prototype.updateShadowTexture = function() { GameState.prototype.updateShadowTexture = function() {