From bf4b94e9ea6b51675a7bbf30eeb9d154c51c8839 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 14 Jun 2014 19:07:42 -0700 Subject: [PATCH] Light meter --- moonlight/js/moonlight-skulk.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 10a8758..0c70d15 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -1101,10 +1101,10 @@ GameState.prototype.update = function() this.check_input(); lightcheck = [ - this.shadowTexture.getRGB(player.x, player.y), - this.shadowTexture.getRGB(player.x + 32, player.y), - this.shadowTexture.getRGB(player.x + 32, player.y + 32), - this.shadowTexture.getRGB(player.x, player.y + 32) + this.shadowTexture.getPixelRGB(player.x, player.y), + this.shadowTexture.getPixelRGB(player.x + 32, player.y), + this.shadowTexture.getPixelRGB(player.x + 32, player.y + 32), + this.shadowTexture.getPixelRGB(player.x, player.y + 32) ]; console.log(lightcheck);