From ecd70d52994c420eea13ab8b2858294615c32461 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 14 Jun 2014 19:16:36 -0700 Subject: [PATCH] Light meter --- moonlight/js/moonlight-skulk.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index a486556..99c9886 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -962,8 +962,6 @@ GameState.prototype.updateShadowTexture = function() { this.shadowTexture.context.fillStyle = gradient; this.shadowTexture.context.arc(light.x + 16, light.y + 16, radius, 0, Math.PI*2); this.shadowTexture.context.fill(); - this.shadowTexture.update(light.x - radius, light.y - radius, - radius * 2, radius * 2); }, this); this.shadowTexture.dirty = true; @@ -1101,6 +1099,7 @@ GameState.prototype.check_input = function() GameState.prototype.update = function() { this.check_input(); + this.shadowTexture.update(player.x, player.y, 32, 32); lightcheck = [ this.shadowTexture.getPixelRGB(player.x, player.y), this.shadowTexture.getPixelRGB(player.x + 32, player.y),