From a7eb935f54977a174083871532ba05864178fe5b Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 29 Jun 2014 11:03:23 -0700 Subject: [PATCH] Move treasure glint sprites above the shadow layer to make them easier to see --- moonlight/src/AISprite.js | 2 +- moonlight/src/GameStates.js | 3 ++- moonlight/src/Util.js | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index 1e8ca8d..111d31a 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -86,7 +86,7 @@ var AISprite = function(game, x, y, key, frame) { this.glint_effect.anchor.setTo(0.5, 0.5); this.glint_effect.play('glint', null, false, true); this.glint_timer = game.time.create(false); - this.glint_timer.add(game.rnd.integerInRange(5000, 15000), + this.glint_timer.add(game.rnd.integerInRange(5000, 10000), this.runGlintEffect, this); tween = game.add.tween(this.glint_effect); diff --git a/moonlight/src/GameStates.js b/moonlight/src/GameStates.js index 8540bae..6ff7b5f 100644 --- a/moonlight/src/GameStates.js +++ b/moonlight/src/GameStates.js @@ -36,7 +36,6 @@ GameState.prototype.create = function() this.aiSprites.forEach(function(spr) { spr.update_new_values(); }, this) - this.aiSpriteEffects = game.add.group(); player = this.add.sprite((19 * 32), (21 * 32), 'player'); player.score = 0; player.lightmeter = 0; @@ -102,6 +101,8 @@ GameState.prototype.create = function() this.staticLights.forEach(function(light) { light.update_new_values(); }, this) + + this.aiSpriteEffects = game.add.group(); this.staticSounds = game.add.group(); this.map.createFromObjects('Sounds', 11, 'player', 0, true, false, this.staticSounds, SoundSprite); diff --git a/moonlight/src/Util.js b/moonlight/src/Util.js index 7de5679..0bee233 100644 --- a/moonlight/src/Util.js +++ b/moonlight/src/Util.js @@ -107,7 +107,6 @@ function nearestWalkableTile(spr) } } } - throw "No walkable tile found near (" + spr.x + "," + spr.y + ")"; } if ( grid.nodes[sprgridy][sprgridx].walkable == true )