From 4bf1871af6de43df70c305e7a9163dfebbc8c0ad Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 14 Jun 2014 12:51:06 -0700 Subject: [PATCH] Fixed player above other sprites --- moonlight/js/moonlight-skulk.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index e8b3976..8a8b8f7 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -805,8 +805,6 @@ GameState.prototype.create = function() ); if ( lp['inject_sprites'] == true ) { this.aiSprites = game.add.group(); - player = this.add.sprite((20 * 32), (25 * 32), 'player'); - this.map.createFromObjects('AI', 3544, 'player', 0, true, false, this.aiSprites, AISprite); this.aiSprites.forEach(function(spr) { spr.update_new_values(); @@ -817,6 +815,7 @@ GameState.prototype.create = function() this.effectSprites.forEach(function(spr) { spr.update_new_values(); }, this) + player = this.add.sprite((20 * 32), (25 * 32), 'player'); }; if ( lp['collides'] == true ) { this.map_collision_layers.push(layer);