phaser-state-transition-plugin
State transition plugin for Phaser.js
Disclaimer
This plugin is based on @cristianbote's phaser-state-transition so lots of thanks to him.
He's been inactive for quite a long time now, so I've taken the liberty to create a new repository with some custom modifications from the original plugin (plus code refactor).
Contributions are most welcome!
Installation
Bower
To install this plugin via bower:
bower install phaser-state-transition-plugin --save
Add it to your index.html (after phaser.js):
<!---->
Usage
Demo!!
Initialize it (if you have a boot state that's where you want to do it):
thisgamestateTransition = thisgameplugins;
Configure global transition tweening properties:
thisgamestateTransition;
In a later release we want to support tween configuration per transition.
Use it:
thisgamestateTransition;
or if you need to pass more arguments like in the original State.start method:
// to(key, clearWorld, clearCache, parameter)thisgamestateTransition;
This isn't supported in the original plugin, and it was the main reason we decided to refactor it.
Happy transitioning
Made with <3