Start putting in wandering sprites with different actor types
This commit is contained in:
@@ -259,16 +259,6 @@ GameState.prototype.create = function()
|
|||||||
);
|
);
|
||||||
this.fpsText.fixedToCamera = true;
|
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
|
// Create the wandering sprites
|
||||||
this.wanderingSprites = game.add.group();
|
this.wanderingSprites = game.add.group();
|
||||||
for ( i = 0; i < 20 ; i++ ) {
|
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
|
// 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++ ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user