From a2f63a9bc2548f17e57ae2b24a581ea6ebb072af Mon Sep 17 00:00:00 2001 From: Viter Date: Wed, 30 Mar 2016 02:58:48 -0300 Subject: [PATCH] =?UTF-8?q?agreg=C3=A9=20los=20archivos=20que=20faltaban?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index2.html | 27 +++++++++++++++++++++++++++ plugins/MyPlugin.js | 26 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 index2.html create mode 100644 plugins/MyPlugin.js diff --git a/index2.html b/index2.html new file mode 100644 index 0000000..a879a4f --- /dev/null +++ b/index2.html @@ -0,0 +1,27 @@ + + + + + Phaser! + + + + + + + + + + + + +
+ + diff --git a/plugins/MyPlugin.js b/plugins/MyPlugin.js new file mode 100644 index 0000000..afade3b --- /dev/null +++ b/plugins/MyPlugin.js @@ -0,0 +1,26 @@ +Phaser.Plugin.MyPlugin = function(game, parent) { + Phaser.Plugin.call(this, game, parent); + + //settings by default + this._default = {}; + this._settings = this._default; + /** + * some function. + */ + this._func = function () { + + + }; +}; + +Phaser.Plugin.MyPlugin.prototype = Object.create(Phaser.Plugin.prototype); +Phaser.Plugin.MyPlugin.prototype.constructor = Phaser.Plugin.MyPlugin; + + + +Phaser.Plugin.MyPlugin.prototype.setup = function (obj) { + this._settings = Phaser.Utils.extend(false, {}, this._default, obj); +}; +Phaser.Plugin.MyPlugin.prototype.func = function(){ + this._func(); +};