How to use Swap
majonathany opened this issue · comments
Hi,
I am trying to build a game that has entities. Upon changing the level, there is a new main character, a new maze, and a new goal. I presume that to change entities for the Game Engine component I have to use swap(), but I can't find any examples or documentation other than it is to switch out entities. How do I use the swap() method, or any other method to switch out the entities?
<GameEngine systems={[this.physics, this.updateGame]} entities={this.state.entities} style={{paddingLeft: widthWindow * .05}}> </GameEngine>
Thanks.