From 3928b6dd2b2594e46eeb9af613eb989263a2e7c8 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 21:42:36 -0700 Subject: [PATCH] More wandering sprite work --- moonlight/js/moonlight-skulk.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index a88e14b..53ed649 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -453,9 +453,11 @@ GameState.prototype.update = function() this.check_input(); this.physics.arcade.collide(player, layer); - this.wanderingSprites.iterate('exists', true, function(x) { + function _inner_collidewith(x) { this.physics.arcade.collide(x, layer); - }); + } + + this.wanderingSprites.iterate('exists', true, _inner_collidewith); //this.movingLight.x = player.x; //this.movingLight.y = player.y; this.updateShadowTexture();