Skip to content

Commit 5ed28ab

Browse files
committed
Fix to support Phaser v2.4.4
1 parent dfc2295 commit 5ed28ab

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

bower.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "phaser-kinetic-scrolling-plugin",
3+
"version": "1.0.2",
4+
"homepage": "https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin",
5+
"authors": [
6+
"Juan David Nicholls Cardona <[email protected]>"
7+
],
8+
"description": "Kinetic Scrolling Plugin for Phaser Framework",
9+
"main": "./dist/phaser-kinetic-scrolling-plugin.min.js",
10+
"keywords": [
11+
"phaser",
12+
"scroll",
13+
"camera",
14+
"vertical",
15+
"horizontal",
16+
"mousewheel",
17+
"kinetic"
18+
],
19+
"license": "MIT",
20+
"ignore": [
21+
"**/.*",
22+
"node_modules",
23+
"bower_components",
24+
"test",
25+
"tests"
26+
]
27+
}

dist/phaser-kinetic-scrolling-plugin.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Juan Nicholls <[email protected]>
44
* @copyright 2015 Juan Nicholls - http://jdnichollsc.github.io/Phaser-Kinetic-Scrolling-Plugin/
55
* @license {@link http://opensource.org/licenses/MIT}
6-
* @version 1.0.1
6+
* @version 1.0.2
77
*/
88

99
(function (Phaser) {
@@ -256,7 +256,12 @@
256256

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

259-
this.game.input.deleteMoveCallback(this.callbackID);
259+
if(this.callbackID){
260+
this.game.input.deleteMoveCallback(this.callbackID);
261+
}
262+
else{
263+
this.game.input.deleteMoveCallback(this.moveCamera, this);
264+
}
260265

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

dist/phaser-kinetic-scrolling-plugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phaser-kinetic-scrolling-plugin",
3-
"version": "1.0.1",
4-
"release": "V 1.0.1",
3+
"version": "1.0.2",
4+
"release": "V 1.0.2",
55
"description": "Kinetic Scrolling Plugin for Phaser Framework",
66
"author": "Juan David Nicholls Cardona <[email protected]>",
77
"logo": "https://raw.github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin/gh-pages/img/plugin.png",

src/phaser-kinetic-scrolling-plugin.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Juan Nicholls <[email protected]>
44
* @copyright 2015 Juan Nicholls - http://jdnichollsc.github.io/Phaser-Kinetic-Scrolling-Plugin/
55
* @license {@link http://opensource.org/licenses/MIT}
6-
* @version 1.0.1
6+
* @version 1.0.2
77
*/
88

99
(function (Phaser) {
@@ -256,7 +256,12 @@
256256

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

259-
this.game.input.deleteMoveCallback(this.callbackID);
259+
if(this.callbackID){
260+
this.game.input.deleteMoveCallback(this.callbackID);
261+
}
262+
else{
263+
this.game.input.deleteMoveCallback(this.moveCamera, this);
264+
}
260265

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

0 commit comments

Comments
 (0)