Jump to content

Source Code Question: Can someone explain to me how exactly the references in State or StateManager are set?


rimdeker
 Share

Recommended Posts

I am trying to understand the Phaser source code and came across a weird part that I just can't figure out. Where and how are the properties (references) in State set to the actual objects that we later use?

I thought that "this" might point to Phaser.Game later (i.e. by calling the Phaser.State methods from the Phaser.Game object) but printing out "this" from within a Phaser.State object does in fact return a Phaser.State object. So now I'm all confused about where these references are updated.

Link to comment
Share on other sites

9 minutes ago, Tom Atom said:

Holy hell. Thank you so much. I've been looking and grepping all over the files all night. Totally missed this!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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