Skip to content

Commit

Permalink
Fix to support Phaser v2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jdnichollsc committed Dec 10, 2015
1 parent dfc2295 commit 5ed28ab
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
27 changes: 27 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "phaser-kinetic-scrolling-plugin",
"version": "1.0.2",
"homepage": "https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin",
"authors": [
"Juan David Nicholls Cardona <[email protected]>"
],
"description": "Kinetic Scrolling Plugin for Phaser Framework",
"main": "./dist/phaser-kinetic-scrolling-plugin.min.js",
"keywords": [
"phaser",
"scroll",
"camera",
"vertical",
"horizontal",
"mousewheel",
"kinetic"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
9 changes: 7 additions & 2 deletions dist/phaser-kinetic-scrolling-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Juan Nicholls <[email protected]>
* @copyright 2015 Juan Nicholls - http://jdnichollsc.github.io/Phaser-Kinetic-Scrolling-Plugin/
* @license {@link http://opensource.org/licenses/MIT}
* @version 1.0.1
* @version 1.0.2
*/

(function (Phaser) {
Expand Down Expand Up @@ -256,7 +256,12 @@

this.game.input.onDown.remove(this.beginMove, this);

this.game.input.deleteMoveCallback(this.callbackID);
if(this.callbackID){
this.game.input.deleteMoveCallback(this.callbackID);
}
else{
this.game.input.deleteMoveCallback(this.moveCamera, this);
}

this.game.input.onUp.remove(this.endMove, this);

Expand Down
2 changes: 1 addition & 1 deletion dist/phaser-kinetic-scrolling-plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "phaser-kinetic-scrolling-plugin",
"version": "1.0.1",
"release": "V 1.0.1",
"version": "1.0.2",
"release": "V 1.0.2",
"description": "Kinetic Scrolling Plugin for Phaser Framework",
"author": "Juan David Nicholls Cardona <[email protected]>",
"logo": "https://raw.github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin/gh-pages/img/plugin.png",
Expand Down
9 changes: 7 additions & 2 deletions src/phaser-kinetic-scrolling-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Juan Nicholls <[email protected]>
* @copyright 2015 Juan Nicholls - http://jdnichollsc.github.io/Phaser-Kinetic-Scrolling-Plugin/
* @license {@link http://opensource.org/licenses/MIT}
* @version 1.0.1
* @version 1.0.2
*/

(function (Phaser) {
Expand Down Expand Up @@ -256,7 +256,12 @@

this.game.input.onDown.remove(this.beginMove, this);

this.game.input.deleteMoveCallback(this.callbackID);
if(this.callbackID){
this.game.input.deleteMoveCallback(this.callbackID);
}
else{
this.game.input.deleteMoveCallback(this.moveCamera, this);
}

this.game.input.onUp.remove(this.endMove, this);

Expand Down

0 comments on commit 5ed28ab

Please sign in to comment.