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
[Question] Need help to use this plugin #16
Comments
Hey there! Sure thing man. Let me grab some examples and I'll post them here, and add them as well as part of #14. |
Alright, so by default you don't need to instantiate the plugin. Just make sure you're including the dist file. I notice your quote about how to transition between state, and I realized I haven't done a great job, explaining what I wanted to achieve with the new version, so sorry about that. Take a look here https://github.com/cristianbote/phaser-state-transition/blob/master/src/index.js#L13 Bottom line: game.state.start('yourStateNameGoesHere', Phaser.Plugin.StateTransition.Out.SlideTop, Phaser.Plugin.StateTransition.In.SlideTop If you're wondering what the hell is Let me know if this was of any help. Cheers |
Thanks man it works at last. |
Glad that it works. Keep an eye on this repo, for more info. |
Can you explain what you mean by
When I transition to my Store state I draw all my sprites in the state's create command. But after the transition finishes they come out all wonky and misplaced. |
Hey, So, let's start with a code example, on how you're drawing inside the create func. Just post an example, and we'll see how it evolves. Looking forward! |
The game I am working on is here. You can download the whole thing, run Also included in my project is the phaser-kinetic-scrolling-plugin, but I've tried removing it and problems persist. The sprites are created in the Store create function here. Thanks for the willingness to help! |
PS: theres some major screen shake if you get damaged in-game, so be prepared. Also, the transition doesn't break 100% of the time. It might be a bit less common when kinetic scrolling is removed, but will definitely happen eventually, either way. |
OK so I figured out that the issue is related to resizing/repositioning of game.world and/or game.camera. I think this might be my fault, as game.world.y is fine at the beginning of store.create(), but changed afterwards. I'll update when I find out more. |
I started a new issue for this to try and prevent any more clutter in this issue. #25 |
Hello, I have read readme file but I can not understand how to use this plugin, I added my states in Boot.js file and imported 'phaser-state-transition.min.js' file inside index.html so when I tried to start my states like this 'game.state.start('playState', [outTransition, [inTransition]]);' it shows some error in console.
Please help me to use this plugin I know it will be a great experience.
The text was updated successfully, but these errors were encountered: