From 179f455960bb9004d11740c754a0e2b15c43a307 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 21:44:50 -0700 Subject: [PATCH] More wandering sprite work --- moonlight/js/moonlight-skulk.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 53ed649..4e1353a 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -453,13 +453,11 @@ GameState.prototype.update = function() this.check_input(); this.physics.arcade.collide(player, layer); - function _inner_collidewith(x) { + function _inner_collidelayer(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.wanderingSprites.forEach(_inner_collidelayer, this); this.updateShadowTexture(); }