Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by congwang0517

my code:
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()?

1 decade ago by Arantor

What's in the updateScene functions? If they contain the code from the parent's update() function, adapted to your needs, they don't have to call this.parent().
Page 1 of 1
« first « previous next › last »