Close #61 : Schrodinbug... should never have ran at all, things were initializing out of order
This commit is contained in:
@@ -29,7 +29,10 @@ GameState.prototype.create = function()
|
||||
);
|
||||
if ( lp['inject_sprites'] == true ) {
|
||||
this.aiSprites = game.add.group();
|
||||
this.aiSprites.debug = true;
|
||||
this.aiSprites.debug = false;
|
||||
this.aiSpriteEffects = game.add.group();
|
||||
this.staticSounds = game.add.group();
|
||||
this.bubble_group = game.add.group();
|
||||
this.map.createFromObjects('AI', 3544, 'player', 0, true, false, this.aiSprites, AISprite);
|
||||
this.aiSprites.forEach(function(spr) {
|
||||
spr.update_new_values();
|
||||
@@ -111,16 +114,12 @@ GameState.prototype.create = function()
|
||||
light.update_new_values();
|
||||
}, this)
|
||||
|
||||
this.aiSpriteEffects = game.add.group();
|
||||
|
||||
this.staticSounds = game.add.group();
|
||||
this.map.createFromObjects('Sounds', 11, 'player', 0, true, false, this.staticSounds, SoundSprite);
|
||||
this.staticSounds.forEach(function(snd) {
|
||||
snd.update_new_values();
|
||||
}, this)
|
||||
|
||||
this.bubble_group = game.add.group();
|
||||
|
||||
this.uigroup = game.add.group();
|
||||
this.recentlyStolenGroup = game.add.group();
|
||||
this.game.time.advancedTiming = true;
|
||||
@@ -432,7 +431,7 @@ GameState.prototype.update = function()
|
||||
_AI_collide);
|
||||
this.updateShadowTexture();
|
||||
|
||||
if ( this.aiSprites.debug == false ) {
|
||||
if ( this.aiSprites.debug == true ) {
|
||||
function _draw_viewrect(x) {
|
||||
var r = x.viewRectangle();
|
||||
if ( isSet(r) == false )
|
||||
@@ -483,6 +482,8 @@ GameState.prototype.shutdown = function()
|
||||
}, this);
|
||||
this.aiSprites.destroy();
|
||||
this.aiSprites = null;
|
||||
this.aiSpriteEffects.destroy();
|
||||
this.aiSpriteEffects = null;
|
||||
this.uigroup.destroy();
|
||||
this.uigroup = null;
|
||||
this.recentlyStolenGroup.destroy();
|
||||
|
||||
Reference in New Issue
Block a user