Jump to content

this.game or this.sys.game?


Tom Atom
 Share

Recommended Posts

Hi, Scenes have property game (Phaser.Game), but it seems to be undefined all the time (in preload, create or update methods of scene). Doc says: "This property will only be available if defined in the Scene Injection Map." and I can see it in default injection map ... but still undefined.

On the other side, there is sys property (object) with game property in it. I can get game reference like this.sys.game instead of this.game.

Is it correct to use this.sys.game? Why is not this.game working? Is it some leftover from older version?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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