text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rexpathfollowerplugin=e():t.rexpathfollowerplugin=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=293)}({2:function(t,e,n){"use strict";var o=Phaser.Scene;e.a=function(t){return t instanceof o}},293:function(t,e,n){"use strict";n.r(e);var o=n(3),r=n(53),i=n.n(r);function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var a=Phaser.Utils.Objects.GetValue,s=Phaser.Math.Angle.Between,c=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gameObject=e,this.scene=Object(o.a)(e),this._t=0,this.pathVector=void 0,this.resetFromJSON(n),this.boot()}var e,n,r;return e=t,(n=[{key:"resetFromJSON",value:function(t){this.setPath(a(t,"path",void 0));var e=a(t,"t",void 0);void 0!==e&&this.setT(e);var n=a(t,"rotateToPath",!1),o=a(t,"rotationOffset",void 0);return void 0===o&&(o=i()(a(t,"angleOffset",0))),this.setRotateToPath(n,o),this}},{key:"toJSON",value:function(){return{path:this.path,t:this.t,rotateToPath:this.rotateToPath,rotationOffset:this.rotationOffset}}},{key:"boot",value:function(){this.gameObject.once&&this.gameObject.once("destroy",this.destroy,this)}},{key:"shutdown",value:function(){this.gameObject=void 0,this.scene=void 0}},{key:"destroy",value:function(){this.shutdown()}},{key:"setPath",value:function(t){return this.path=t,this}},{key:"setT",value:function(t){return this.t=t,this}},{key:"setRotateToPath",value:function(t,e){return this.rotateToPath=t,this.rotationOffset=e,this}},{key:"update",value:function(){if(void 0!==this.path){var t=this.gameObject,e=t.x,n=t.y;this.pathVector=this.path.getPoint(this.t,this.pathVector);var o=this.pathVector.x,r=this.pathVector.y;e===o&&n===r||(t.setPosition(o,r),this.rotateToPath&&(t.rotation=s(e,n,o,r)+this.rotationOffset))}}},{key:"t",get:function(){return this._t},set:function(t){this._t=t,this.update()}}])&&u(e.prototype,n),r&&u(e,r),t}();function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function l(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var b=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,p(e).call(this,t))}var n,o,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(e,Phaser.Plugins.BasePlugin),n=e,(o=[{key:"start",value:function(){this.game.events.once("destroy",this.destroy,this)}},{key:"add",value:function(t,e){return new c(t,e)}}])&&h(n.prototype,o),r&&h(n,r),e}();e.default=b},3:function(t,e,n){"use strict";var o=n(2);e.a=function(t){return Object(o.a)(t)?t:t.scene&&Object(o.a)(t.scene)?t.scene:t.parent&&t.parent.scene&&Object(o.a)(t.parent.scene)?t.parent.scene:void 0}},53:function(t,e){var n=Math.PI/180;t.exports=function(t){return t*n}}}).default});