Phaser.Plugin = function (game, parent){ if (parent === undefined) { parent = null ; } this.game = game; this.parent = parent; this.active = false ; this.visible = false ; this.hasPreUpdate = false ; this.hasUpdate = false ; this.hasPostUpdate = false ; this.hasRender = false ; this.hasPostRender = false ; } ; Phaser.Plugin.prototype = { preUpdate: function (){ } , update: function (){ } , render: function (){ } , postRender: function (){ } , destroy: function (){ this.game = null ; this.parent = null ; this.active = false ; this.visible = false ; } } ; Phaser.Plugin.prototype.constructor = Phaser.Plugin;