Jump to content

Game not destroyed


Recommended Posts

I have a workaround for this but not sure it is optimal

When a specific collisions occurs I send off a request to the server and if they are no longer logged in I need to redirect them to login

if (response.status == 401)
				console.log('not logged in');
				game = null;
				$window.location.href = '#/login';


. The only way I have been able to get this to work is to change the state of the game


then add a button there to redirect to the login.


The error is it seems the phaser loop is still running if I call game.destroy from within the update of the active stage.


This is a mix of angular and phaser and except for this minor issue things have gone quite well

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...