Light meter
This commit is contained in:
@@ -1101,10 +1101,10 @@ GameState.prototype.check_input = function()
|
|||||||
GameState.prototype.update_player_lightmeter = function() {
|
GameState.prototype.update_player_lightmeter = function() {
|
||||||
lightValue = 0;
|
lightValue = 0;
|
||||||
this.staticLights.forEach(function(light) {
|
this.staticLights.forEach(function(light) {
|
||||||
var xd = (spr.x - light.x);
|
var xd = (player.x - light.x);
|
||||||
if ( xd < 0 )
|
if ( xd < 0 )
|
||||||
xd = -(xd);
|
xd = -(xd);
|
||||||
var yd = (spr.y - light.y);
|
var yd = (player.y - light.y);
|
||||||
if ( yd < 0 )
|
if ( yd < 0 )
|
||||||
yd = -(yd);
|
yd = -(yd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user