UNPKG

qs_phaser3_plugins

Version:
38 lines (37 loc) 1.64 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var select_group_1 = __importDefault(require("../modules/select-group")); var phaser_1 = __importDefault(require("phaser")); var SelectGroupPlugin = /** @class */ (function (_super) { __extends(SelectGroupPlugin, _super); function SelectGroupPlugin(scene, pluginManager) { var _this = _super.call(this, scene, pluginManager) || this; // Register our new Game Object type pluginManager.registerGameObject('selectgroup', _this.createSelectGroup); return _this; } SelectGroupPlugin.prototype.createSelectGroup = function (gameObjects) { return new select_group_1.default(gameObjects, { scene: this.scene }); }; return SelectGroupPlugin; }(phaser_1.default.Plugins.ScenePlugin)); ; exports.default = SelectGroupPlugin;