Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how Phaser messages and switches between scenes #18

Closed
JoshuaKGoldberg opened this issue Jun 16, 2019 · 1 comment · Fixed by #30
Closed

Figure out how Phaser messages and switches between scenes #18

JoshuaKGoldberg opened this issue Jun 16, 2019 · 1 comment · Fixed by #30
Labels
type: cleanup Technical debt, testing, or similar improvements

Comments

@JoshuaKGoldberg
Copy link
Collaborator

Following #17:

I don't know Phaser best practices and I don't know how to message pass between scenes... in the meantime, made a state.js file that keeps the game so they can start other scenes. I'm hoping there's an easier way to get around this.

@JoshuaKGoldberg JoshuaKGoldberg added the type: cleanup Technical debt, testing, or similar improvements label Jun 17, 2019
@JoshuaKGoldberg
Copy link
Collaborator Author

Talked to @LinKCoding a bit, who pointed out:

  • We can call this.scene.start("GameScene")
  • After that, we don't need to keep shared state between scenes
  • If we want to message pass from one scene to another

...and pointed me to https://www.codecademy.com/courses/learn-phaser/lessons/complexity-in-phaser/exercises/scene-transitions?action=resume_content_item, which is exactly what I needed for the scene shenanigans, thanks 🙂

JoshuaKGoldberg pushed a commit that referenced this issue Jun 19, 2019
Used this.scene as per Phaser conventions.

Fixes #18.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup Technical debt, testing, or similar improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant