Jump to content

Scene Change


Dafab
 Share

Recommended Posts

Hello,

 

I am new to phaser and I wonder what is the best way to change scene back and forth.

Right now I have a working code that do:

 

Splashscreen > scene#1 > scene#2

 

I do it by putting each element of a given scene in group and when I click on a given scene, I wrote :

game.world.remove(menu_group);

then I add all the elements of the next scene and so on...

 

I guess that there is a better way to this. Can you lead me please to the best way to do it?

I would like to do something like

 

 

onClickScene1() {

 

hideScene1();

DisableInputsOfScene1();

ShowScene2();

 

etc();

 

}

 

 

EDIT : Don't bother, I found out.

Edited by Dafab
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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