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(); +};