1 decade ago by congwang0517
my code:
Note that I didn't use the this.parent(); I want to update the entities in every scene alone rather than all togather. But if do this, the killed entity won't remove from the game.I know the reason that the this.parent() in ig.game 's update(),it will remove the killed entities.
How can I resolve the problem. Must I use the this.parent()?
update : function() { switch(this.scene){ case 0: this.updateScene1(); break; case 1: this.updateScene2(); break; case 2: this.updateScene3(); break; } },
Note that I didn't use the this.parent(); I want to update the entities in every scene alone rather than all togather. But if do this, the killed entity won't remove from the game.I know the reason that the this.parent() in ig.game 's update(),it will remove the killed entities.
How can I resolve the problem. Must I use the this.parent()?