From 1bddcd4ac5e32eb60b8c2e1b9f53e0cb9fb6d692 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 20:48:04 -0700 Subject: [PATCH] Start putting in wandering sprites with different actor types --- moonlight/js/moonlight-skulk.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 6700733..edd39fe 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -259,16 +259,6 @@ GameState.prototype.create = function() ); this.fpsText.fixedToCamera = true; - this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height); - this.shadowTextureColor = 'rgb(50, 50, 50)'; - - // Create an object that will use the bitmap as a texture - this.shadowSprite = game.add.image(0, 0, this.shadowTexture); - - // Set the blend mode to MULTIPLY. This will darken the colors of - // everything below this sprite. - this.shadowSprite.blendMode = Phaser.blendModes.MULTIPLY; - // Create the wandering sprites this.wanderingSprites = game.add.group(); for ( i = 0; i < 20 ; i++ ) { @@ -281,6 +271,16 @@ GameState.prototype.create = function() ); } + this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height); + this.shadowTextureColor = 'rgb(50, 50, 50)'; + + // Create an object that will use the bitmap as a texture + this.shadowSprite = game.add.image(0, 0, this.shadowTexture); + + // Set the blend mode to MULTIPLY. This will darken the colors of + // everything below this sprite. + this.shadowSprite.blendMode = Phaser.blendModes.MULTIPLY; + // Create the lights this.staticLights = game.add.group(); for (i = 0; i < 20 ; i++ ) {