Light meter

This commit is contained in:
2014-06-14 20:09:34 -07:00
parent ae197d89af
commit f45f840b50

View File

@@ -1101,10 +1101,10 @@ GameState.prototype.check_input = function()
GameState.prototype.update_player_lightmeter = function() {
lightValue = 0;
this.staticLights.forEach(function(light) {
var xd = (player.x - light.x);
var xd = (player.x + 16 - light.x);
if ( xd < 0 )
xd = -(xd);
var yd = (player.y - light.y);
var yd = (player.y + 16 - light.y);
if ( yd < 0 )
yd = -(yd);