Jump to content

Chaining StateManager.start()


quarks
 Share

Recommended Posts

On the documentation page at https://github.com/photonstorm/phaser/wiki/Phaser-General-Documentation-:-States, in the 'Example of specialized states', there is this line of code:

pacman.state.start('Boot').start('MainMenu').start('Game');

Does this work? The intended semantics seem to be that state 'Boot' will be executed to completion, followed by 'MainMenu', followed by 'Game'. That suggests that the start method returns some sort of promise-like object whose start method queues the subsequent state change. But it appears that the start method of StateManager doesn't return anything at all. Am I missing something, or is the documentation incorrect?

 

Jay

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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