From 60426dead1bfe9070d47da0f9072615897753fb0 Mon Sep 17 00:00:00 2001 From: Juan David Nicholls Cardona Date: Sat, 10 Feb 2018 19:52:56 -0500 Subject: [PATCH] Code review --- examples/example_6.html | 20 ------- examples/index.html | 122 +++++++++++++++++++++++++++++++++++++++ examples/js/example_6.js | 48 --------------- gulpfile.js | 2 +- 4 files changed, 123 insertions(+), 69 deletions(-) delete mode 100644 examples/example_6.html create mode 100644 examples/index.html delete mode 100644 examples/js/example_6.js diff --git a/examples/example_6.html b/examples/example_6.html deleted file mode 100644 index 453930c..0000000 --- a/examples/example_6.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Phaser-Kinetic-Scrolling-Plugin - - - - - - - -
- - diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..0206b2b --- /dev/null +++ b/examples/index.html @@ -0,0 +1,122 @@ + + + + + + + Document + + + +
+

Demos (Created by the Community)

+ +
+ + \ No newline at end of file diff --git a/examples/js/example_6.js b/examples/js/example_6.js deleted file mode 100644 index 7c4f512..0000000 --- a/examples/js/example_6.js +++ /dev/null @@ -1,48 +0,0 @@ -var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'phaser-example', { - init: function () { - - //Load the plugin - this.game.kineticScrolling = this.game.plugins.add(Phaser.Plugin.KineticScrolling); - - }, - create: function () { - - //Starts the plugin - this.game.kineticScrolling.start(); - - - this.game.add.text( - game.world.width * 0.01, - game.world.height * 0.01, - "More than one finger touch screen not break & fast tap screen will not move", - { font: "16px Arial", fill: "#ffffff" } - ).fixedToCamera = true; - - //If you want change the default configuration after start the plugin - - this.rectangles = []; - - var initX = 50; - - for (var i = 0; i < 25; i++) { - this.rectangles.push(this.createRectangle(initX, this.game.world.centerY - 100, 250, 200)); - this.index = this.game.add.text(initX + 125, this.game.world.centerY, i + 1, - { font: 'bold 150px Arial', align: "center" }); - this.index.anchor.set(0.5); - initX += 300; - } - - //Changing the world width - this.game.world.setBounds(0, 0, 302 * this.rectangles.length, this.game.height); - }, - - createRectangle: function (x, y, w, h) { - var sprite = this.game.add.graphics(x, y); - sprite.beginFill(Phaser.Color.getRandomColor(100, 255), 1); - sprite.bounds = new PIXI.Rectangle(0, 0, w, h); - sprite.drawRect(0, 0, w, h); - - return sprite; - } -}); - diff --git a/gulpfile.js b/gulpfile.js index 56f1486..ab95e52 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -38,4 +38,4 @@ gulp.task('examples', function() { gulp.task('watch', function() { gulp.watch(paths.source, ['dist']); -}); +}); \ No newline at end of file