-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Access Vue this from the scene object #43
Comments
Can you use an event emitter approach instead? |
Well that's what I wanted to do, but I still need this.$emit inside my create() method, thus I need access to vue this |
Try using a third party EventEmitter system, e.g: https://www.npmjs.com/package/eventemitter3 |
I mean, Phaser has an EventEmitter system and VueJS too, so try using another alternative so that they can communicate, it could even be with Service workers, imagination is the limit! <3 |
You probably already found a solution but I'll just share how I did it for any future readers.
Then inside phaser game code you can access the |
dude, you've saved my life!!!! |
Hey there, I'm trying to access the "vue this" inside the scene object where all the magic happens, as to be able to interact between the game and the app. I've tried many ways but can't seem to find a way to properly do it, and the documentation is a bit lacking on the subject.
What's the correct way to get the vue context inside the game component ? Also, is this the right way to create interaction between the two parts ?
The text was updated successfully, but these errors were encountered: