1 decade ago by PaulManjarres
Hi, I'm trying to implement a Game Over Screen as a new Game class. In the update method I check for certain conditions and do a call to:
But I'm getting the following errors in the Javascript console:
My main game class is a Box2dGame, and I'm using the map-minifier plugin, don't know if that matters.
The docs says that is safe to call the setGame method wherever in the game, but inside my main game class I'm getting that error always. If I try to set the game over screen from a start screen (another Game class but not box2dgame) it works.
Thanks.
ig.system.setGame(ig.GameOverScreen);
But I'm getting the following errors in the Javascript console:
Uncaught TypeError: Cannot read property 'Z_INDEX' of undefined (game.js:37)
My main game class is a Box2dGame, and I'm using the map-minifier plugin, don't know if that matters.
The docs says that is safe to call the setGame method wherever in the game, but inside my main game class I'm getting that error always. If I try to set the game over screen from a start screen (another Game class but not box2dgame) it works.
Thanks.