-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Description
Hi, in following the First Game tutorial, I noticed part5 of the published phaser.io documentation does not declare the player variable.
This can lead to an error if you're following along verbatim and could prove challenging to folks who are trying to get this working on the first try.
While the Github examples repo code does define this variable (html src, versioned html, js src, versioned js) the generated docs that are published on the website omit this and seem out-of-date.
I was intending to open a PR to suggest a fix, but the GitHub example code is correct, so the issue seems to be with how it's synced with the published versions on the site.
Additional Information
Of note, part3 does declare the platforms variable with var:
I suggest updating the part5 example to use a similar approach to prevent confusion (or adopt this.player and this.platforms like the Launcher Blade version of the tutorial does to avoid these scoping issues for this simple tutorial).
Thanks