@urso/core 0.2.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,125 +27,129 @@ object-assign
27
27
  */
28
28
 
29
29
  /*!
30
- * @pixi/constants - v5.3.11
31
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
30
+ * @pixi-spine/loader-base - v3.0.13
31
+ * Compiled Mon, 13 Sep 2021 16:46:34 UTC
32
+ *
33
+ * @pixi-spine/loader-base is licensed under the MIT License.
34
+ * http://www.opensource.org/licenses/mit-license
35
+ *
36
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
37
+ */
38
+
39
+ /*!
40
+ * @pixi-spine/runtime-3.8 - v3.0.13
41
+ * Compiled Mon, 13 Sep 2021 16:46:34 UTC
42
+ *
43
+ * @pixi-spine/runtime-3.8 is licensed under the MIT License.
44
+ * http://www.opensource.org/licenses/mit-license
45
+ *
46
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
47
+ */
48
+
49
+ /*!
50
+ * @pixi/constants - v6.2.0
51
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
32
52
  *
33
53
  * @pixi/constants is licensed under the MIT License.
34
54
  * http://www.opensource.org/licenses/mit-license
35
55
  */
36
56
 
37
57
  /*!
38
- * @pixi/core - v5.3.11
39
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
58
+ * @pixi/core - v6.2.0
59
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
40
60
  *
41
61
  * @pixi/core is licensed under the MIT License.
42
62
  * http://www.opensource.org/licenses/mit-license
43
63
  */
44
64
 
45
65
  /*!
46
- * @pixi/display - v5.3.11
47
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
66
+ * @pixi/display - v6.2.0
67
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
48
68
  *
49
69
  * @pixi/display is licensed under the MIT License.
50
70
  * http://www.opensource.org/licenses/mit-license
51
71
  */
52
72
 
53
73
  /*!
54
- * @pixi/extract - v5.3.11
55
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
74
+ * @pixi/extract - v6.2.0
75
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
56
76
  *
57
77
  * @pixi/extract is licensed under the MIT License.
58
78
  * http://www.opensource.org/licenses/mit-license
59
79
  */
60
80
 
61
81
  /*!
62
- * @pixi/filter-displacement - v5.3.11
63
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
82
+ * @pixi/filter-displacement - v6.2.0
83
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
64
84
  *
65
85
  * @pixi/filter-displacement is licensed under the MIT License.
66
86
  * http://www.opensource.org/licenses/mit-license
67
87
  */
68
88
 
69
89
  /*!
70
- * @pixi/loaders - v5.3.11
71
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
90
+ * @pixi/loaders - v6.2.0
91
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
72
92
  *
73
93
  * @pixi/loaders is licensed under the MIT License.
74
94
  * http://www.opensource.org/licenses/mit-license
75
95
  */
76
96
 
77
97
  /*!
78
- * @pixi/math - v5.3.11
79
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
98
+ * @pixi/math - v6.2.0
99
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
80
100
  *
81
101
  * @pixi/math is licensed under the MIT License.
82
102
  * http://www.opensource.org/licenses/mit-license
83
103
  */
84
104
 
85
105
  /*!
86
- * @pixi/mesh-extras - v5.3.11
87
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
88
- *
89
- * @pixi/mesh-extras is licensed under the MIT License.
90
- * http://www.opensource.org/licenses/mit-license
91
- */
92
-
93
- /*!
94
- * @pixi/mixin-get-child-by-name - v5.3.11
95
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
106
+ * @pixi/mixin-get-child-by-name - v6.2.0
107
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
96
108
  *
97
109
  * @pixi/mixin-get-child-by-name is licensed under the MIT License.
98
110
  * http://www.opensource.org/licenses/mit-license
99
111
  */
100
112
 
101
113
  /*!
102
- * @pixi/mixin-get-global-position - v5.3.11
103
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
114
+ * @pixi/mixin-get-global-position - v6.2.0
115
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
104
116
  *
105
117
  * @pixi/mixin-get-global-position is licensed under the MIT License.
106
118
  * http://www.opensource.org/licenses/mit-license
107
119
  */
108
120
 
109
121
  /*!
110
- * @pixi/polyfill - v5.3.11
111
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
122
+ * @pixi/polyfill - v6.2.0
123
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
112
124
  *
113
125
  * @pixi/polyfill is licensed under the MIT License.
114
126
  * http://www.opensource.org/licenses/mit-license
115
127
  */
116
128
 
117
129
  /*!
118
- * @pixi/prepare - v5.3.11
119
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
130
+ * @pixi/prepare - v6.2.0
131
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
120
132
  *
121
133
  * @pixi/prepare is licensed under the MIT License.
122
134
  * http://www.opensource.org/licenses/mit-license
123
135
  */
124
136
 
125
137
  /*!
126
- * @pixi/runner - v5.3.11
127
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
138
+ * @pixi/runner - v6.2.0
139
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
128
140
  *
129
141
  * @pixi/runner is licensed under the MIT License.
130
142
  * http://www.opensource.org/licenses/mit-license
131
143
  */
132
144
 
133
145
  /*!
134
- * @pixi/ticker - v5.3.11
135
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
146
+ * @pixi/ticker - v6.2.0
147
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
136
148
  *
137
149
  * @pixi/ticker is licensed under the MIT License.
138
150
  * http://www.opensource.org/licenses/mit-license
139
151
  */
140
152
 
141
- /*!
142
- * @pixi/utils - v5.3.11
143
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
144
- *
145
- * @pixi/utils is licensed under the MIT License.
146
- * http://www.opensource.org/licenses/mit-license
147
- */
148
-
149
153
  /*!
150
154
  * GSAP 3.8.0
151
155
  * https://greensock.com
@@ -164,6 +168,16 @@ object-assign
164
168
  * http://www.opensource.org/licenses/mit-license
165
169
  */
166
170
 
171
+ /*!
172
+ * pixi-spine - v3.0.13
173
+ * Compiled Mon, 13 Sep 2021 16:46:43 UTC
174
+ *
175
+ * pixi-spine is licensed under the MIT License.
176
+ * http://www.opensource.org/licenses/mit-license
177
+ *
178
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
179
+ */
180
+
167
181
  /*!
168
182
  * pixi-viewport - v4.34.3
169
183
  * Compiled Wed, 01 Dec 2021 19:28:04 UTC
@@ -175,14 +189,28 @@ object-assign
175
189
  */
176
190
 
177
191
  /*!
178
- * resource-loader - v3.0.1
179
- * https://github.com/pixijs/pixi-sound
180
- * Compiled Tue, 02 Jul 2019 14:06:18 UTC
192
+ * pixi.js - v6.2.0
193
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
181
194
  *
182
- * resource-loader is licensed under the MIT license.
195
+ * pixi.js is licensed under the MIT License.
183
196
  * http://www.opensource.org/licenses/mit-license
184
197
  */
185
198
 
199
+ /*! *****************************************************************************
200
+ Copyright (c) Microsoft Corporation.
201
+
202
+ Permission to use, copy, modify, and/or distribute this software for any
203
+ purpose with or without fee is hereby granted.
204
+
205
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
206
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
207
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
208
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
209
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
210
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
211
+ PERFORMANCE OF THIS SOFTWARE.
212
+ ***************************************************************************** */
213
+
186
214
  /*! *****************************************************************************
187
215
  Copyright (c) Microsoft Corporation. All rights reserved.
188
216
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -27,9 +27,8 @@
27
27
  "howler": "^2.2.1",
28
28
  "pixi-particles": "^4.3.0",
29
29
  "pixi-projection": "0.3.15",
30
- "pixi-spine": "^2.1.11",
31
- "pixi.js": "^5.1.3",
32
- "pixi5-dragonbones": "5.7.0-2",
30
+ "pixi-spine": "^3.0.13",
31
+ "pixi.js": "^6.2.0",
33
32
  "pixi-scrollbox": "^2.3.1",
34
33
  "pixi-viewport": "^4.34.0",
35
34
  "pixi-text-input": "^1.0.6"
@@ -6,12 +6,10 @@ import { DropShadowFilter } from '@pixi/filter-drop-shadow';
6
6
  PIXI.filters['DropShadowFilter'] = DropShadowFilter;
7
7
 
8
8
 
9
- require("pixi-spine");
9
+ window.PIXI.spine = require("pixi-spine");
10
10
  require("pixi-projection");
11
11
  require("pixi-text-input");
12
12
 
13
- Urso.DragonBones = require("pixi5-dragonbones");
14
-
15
13
  import { gsap } from 'gsap';
16
14
  window.gsap = gsap;
17
15
 
@@ -3,7 +3,6 @@ Urso.Core.Modules.Assets.Models = {
3
3
  Atlas: require('./atlas.js'),
4
4
  BitmapFont: require('./bitmapFont.js'),
5
5
  Container: require('./container.js'),
6
- DragonBones: require('./dragonBones.js'),
7
6
  Image: require('./image.js'),
8
7
  Json: require('./json.js'),
9
8
  Sound: require('./sound.js'),
@@ -189,9 +189,6 @@ class ModulesAssetsService {
189
189
  case Urso.types.assets.CONTAINER:
190
190
  model = this.getInstance('Models.Container', asset)
191
191
  break;
192
- case Urso.types.assets.DRAGONBONES:
193
- model = this.getInstance('Models.DragonBones', asset)
194
- break;
195
192
  case Urso.types.assets.ATLAS:
196
193
  model = this.getInstance('Models.Atlas', asset)
197
194
  break;
@@ -221,7 +218,7 @@ class ModulesAssetsService {
221
218
  //set loadingGroup
222
219
  model.loadingGroup = loadingGroup || model.loadingGroup || this.getInstance('Config').loadingGroups.initial;
223
220
 
224
- //check if container or dragonbones
221
+ //check if container
225
222
  if (model.contents) {
226
223
  for (let content of model.contents) {
227
224
  this._addAsset(content, model.loadingGroup);
@@ -89,9 +89,6 @@ class ModulesObjectsCreate {
89
89
  case Urso.types.objects.BITMAPTEXT:
90
90
  model = this.getInstance('Models.BitmapText', object);
91
91
  break;
92
- case Urso.types.objects.DRAGONBONES:
93
- model = this.getInstance('Models.DragonBones', object);
94
- break;
95
92
  case Urso.types.objects.HITAREA:
96
93
  model = this.getInstance('Models.HitArea', object);
97
94
  break;
@@ -6,7 +6,6 @@ Urso.Core.Modules.Objects.Models = {
6
6
  Collection: require('./collection.js'),
7
7
  Component: require('./component.js'),
8
8
  Container: require('./container.js'),
9
- DragonBones: require('./dragonBones.js'),
10
9
  Emitter: require('./emitter.js'),
11
10
  Graphics: require('./graphics.js'),
12
11
  Group: require('./group.js'),
@@ -9,9 +9,8 @@ class ModulesTemplateTypes {
9
9
  SPINE: 5,
10
10
  BITMAPFONT: 6,
11
11
  SOUND: 7,
12
- DRAGONBONES: 8,
13
- FONT: 9,
14
- AUDIOSPRITE: 10
12
+ FONT: 8,
13
+ AUDIOSPRITE: 9
15
14
  },
16
15
 
17
16
  objects: {
@@ -31,13 +30,12 @@ class ModulesTemplateTypes {
31
30
  COMPONENT: 14,
32
31
  GROUP: 15,
33
32
  IMAGES_ANIMATION: 16,
34
- DRAGONBONES: 17,
35
- ATLASIMAGE: 18,
36
- SLIDER: 19,
37
- TOGGLE: 20,
38
- CHECKBOX: 21,
39
- SCROLLBOX: 22,
40
- TEXTINPUT: 23
33
+ ATLASIMAGE: 17,
34
+ SLIDER: 18,
35
+ TOGGLE: 19,
36
+ CHECKBOX: 20,
37
+ SCROLLBOX: 21,
38
+ TEXTINPUT: 22
41
39
  }
42
40
  }
43
41
  }
@@ -1,27 +0,0 @@
1
- class ModulesAssetsModelsDragonBones extends Urso.Core.Modules.Assets.BaseModel {
2
- constructor(params) {
3
- super(params);
4
-
5
- this.type = Urso.types.assets.DRAGONBONES;
6
-
7
- //for manual filenames setup
8
- this.contents = Urso.helper.recursiveGet('contents', params, [
9
- { type: Urso.types.assets.JSON, key: `${this.key}_skeletonJson`, path: this.skeletonJson },
10
- { type: Urso.types.assets.JSON, key: `${this.key}_textureJson`, path: this.textureJson },
11
- { type: Urso.types.assets.IMAGE, key: `${this.key}_textureImage`, path: this.textureImage }
12
- ]);
13
-
14
- this.path = false;
15
- this.key = false;
16
- }
17
-
18
- setupParams(params) {
19
- super.setupParams(params);
20
-
21
- this.skeletonJson = Urso.helper.recursiveGet('skeletonJson', params, false);
22
- this.textureJson = Urso.helper.recursiveGet('textureJson', params, false);
23
- this.textureImage = Urso.helper.recursiveGet('textureImage', params, false);
24
- }
25
- }
26
-
27
- module.exports = ModulesAssetsModelsDragonBones;
@@ -1,250 +0,0 @@
1
- const POOL_NAME = 'core.ObjectsModelsDragonBones.pool';
2
-
3
- class ModulesObjectsModelsDragonBones extends Urso.Core.Modules.Objects.BaseModel {
4
- constructor(params) {
5
- super(params);
6
-
7
- this._pool = this._checkPool();
8
- this._poolMember = null;
9
- this.type = Urso.types.objects.DRAGONBONES;
10
-
11
- this._onStart = null;
12
- this._onLoop = null;
13
- this._onComplete = null;
14
- this._onCompleteOnce = null;
15
-
16
- this.setAnimationConfig({}, true);
17
- this._addBaseObject();
18
- }
19
-
20
- setupParams(params) {
21
- super.setupParams(params);
22
-
23
- this.assetKey = Urso.helper.recursiveGet('assetKey', params, false);
24
-
25
- this.animation = {
26
- timeScale: 1,
27
- animationName: Urso.helper.recursiveGet('animation.animationName', params, false),
28
- armatureName: Urso.helper.recursiveGet('animation.armatureName', params, false),
29
- autoplay: Urso.helper.recursiveGet('animation.autoplay', params, false),
30
- loop: Urso.helper.recursiveGet('animation.loop', params, false),
31
- onStart: Urso.helper.recursiveGet('animation.onStart', params, false),
32
- onLoop: Urso.helper.recursiveGet('animation.onLoop', params, false),
33
- onComplete: Urso.helper.recursiveGet('animation.onComplete', params, false),
34
- onCompleteOnce: Urso.helper.recursiveGet('animation.onCompleteOnce', params, false)
35
- };
36
- }
37
-
38
- _addBaseObject() {
39
- const assets = this._getAssets();
40
-
41
- if (!this.animation.armatureName || !assets) {
42
- this._baseObject = new PIXI.Sprite();
43
- return;
44
- }
45
-
46
- this._createAnimationObject(assets);
47
-
48
- const { animationName, autoplay, loop } = this.animation;
49
-
50
- if (autoplay)
51
- this.play(animationName, loop);
52
- };
53
-
54
- _getAssets() {
55
- const skeletonJson = Urso.cache.getJson(`${this.assetKey}_skeletonJson`);
56
- const textureJson = Urso.cache.getJson(`${this.assetKey}_textureJson`);
57
- const textureImage = Urso.cache.getImage(`${this.assetKey}_textureImage`);
58
-
59
- if (!skeletonJson || !textureJson || !textureImage) {
60
- Urso.logger.error('ModulesObjectsModelsDragonBones assets error: no DragonBones object ' + this.assetKey);
61
- return false;
62
- }
63
-
64
- return { skeletonJson, textureJson, textureImage };
65
- }
66
-
67
- _createAnimationObject(assets) {
68
- const { armatureName } = this.animation;
69
- this._poolMember = this._pool.getElement(armatureName, assets);
70
- this._baseObject = this._poolMember.data;
71
- this._setCommonFunctions.bind(this)();
72
- this._setCallbacks();
73
- }
74
-
75
- _constructorFunction(armatureName, assets) {
76
- const { skeletonJson, textureJson, textureImage } = assets;
77
-
78
- const factory = Urso.DragonBones.PixiFactory.factory;
79
-
80
- if (!factory._dragonBonesDataMap[skeletonJson.data.name])
81
- factory.parseDragonBonesData(skeletonJson.data);
82
-
83
- factory.parseTextureAtlasData(textureJson.data, textureImage.texture);
84
-
85
- return factory.buildArmatureDisplay(armatureName);
86
- }
87
-
88
- _resetAnimationFunction(object) { //this._baseObject
89
- object.removeAllListeners(Urso.DragonBones.EventObject.START);
90
- object.removeAllListeners(Urso.DragonBones.EventObject.LOOP_COMPLETE);
91
- object.removeAllListeners(Urso.DragonBones.EventObject.COMPLETE);
92
- object.filters = [];
93
- return object;
94
- }
95
-
96
- _removeCallbacks(config) {
97
- if (this._onStart && config.onStart) {
98
- this._baseObject.removeListener(Urso.DragonBones.EventObject.START, this._onStart);
99
- this._onStart = null;
100
- }
101
-
102
- if (this._onLoop && config.onLoop) {
103
- this._baseObject.removeListener(Urso.DragonBones.EventObject.LOOP_COMPLETE, this._onLoop);
104
- this._onLoop = null;
105
- }
106
-
107
- if (this._onComplete && config.onComplete) {
108
- this._baseObject.removeListener(Urso.DragonBones.EventObject.COMPLETE, this._onComplete);
109
- this._onComplete = null;
110
- }
111
-
112
- if (this._onCompleteOnce && config.onCompleteOnce) {
113
- this._removeOnCompleteOnce(config);
114
- }
115
- };
116
-
117
- _removeOnCompleteOnce() {
118
- this._baseObject.removeListener(Urso.DragonBones.EventObject.COMPLETE, this._onCompleteOnce);
119
- this._onCompleteOnce = null;
120
- }
121
-
122
- _setCallbacks() {
123
- if (this.animation.onStart) {
124
- this._onStart = this.animation.onStart.bind(this);
125
- this._baseObject.addListener(Urso.DragonBones.EventObject.START, this._onStart);
126
- }
127
-
128
- if (this.animation.onLoop) {
129
- this._onLoop = this.animation.onLoop.bind(this);
130
- this._baseObject.addListener(Urso.DragonBones.EventObject.LOOP_COMPLETE, this._onLoop);
131
- }
132
-
133
- if (this.animation.onComplete) {
134
- this._onComplete = this.animation.onComplete.bind(this);
135
- this._baseObject.addListener(Urso.DragonBones.EventObject.COMPLETE, this._onComplete);
136
- }
137
-
138
- if (this.animation.onCompleteOnce) {
139
- const onCompleteOnce = this.animation.onCompleteOnce.bind(this);
140
-
141
- this.animation.onCompleteOnce = null;
142
-
143
- this._onCompleteOnce = () => {
144
- this._removeOnCompleteOnce();
145
- onCompleteOnce();
146
- };
147
-
148
- this._baseObject.once(Urso.DragonBones.EventObject.COMPLETE, this._onCompleteOnce);
149
- }
150
- }
151
-
152
- /**
153
- *
154
- * @param {*} config
155
- * @param {boolean} [noObjectCreate] dont use this flag out of core
156
- *
157
- * config keys:
158
- * animationName
159
- * armatureName
160
- autoplay
161
- timeScale
162
- onStart
163
- onLoop
164
- onComplete
165
- onCompleteOnce
166
- */
167
- setAnimationConfig(config = {}, noObjectCreate) {
168
- if (this.stop)
169
- this.stop();
170
-
171
- this.animation = {
172
- ...this.animation,
173
- ...config
174
- };
175
-
176
- if (config.timeScale)
177
- this._baseObject.animation.timeScale = config.timeScale;
178
-
179
- if (config.onStart || config.onLoop || config.onComplete || config.onCompleteOnce) {
180
- this._removeCallbacks(config);
181
- this._setCallbacks();
182
- }
183
-
184
- if (noObjectCreate || !config.armatureName)
185
- return;
186
-
187
- let parent = null;
188
-
189
- if (this._baseObject) {
190
- parent = this._baseObject.parent;
191
- this._customDestroy();
192
- }
193
-
194
- const assets = this._getAssets();
195
-
196
- if (assets)
197
- this._createAnimationObject(assets);
198
-
199
- if (parent) {
200
- parent.addChild(this._baseObject);
201
- //update common properties after adding to apply model settings
202
- Urso.objects._updateCommonProperties(this);
203
- }
204
- }
205
-
206
- /**
207
- * run play animation
208
- * @param {number} times
209
- */
210
- play(animationName, loopFlag = false) {
211
- if (!this._baseObject.animation) {
212
- Urso.logger.error(`DragonBones animation not found!`);
213
- return;
214
- }
215
-
216
- if (this.stop)
217
- this.stop();
218
-
219
- const times = (loopFlag) ? -1 : 1;
220
-
221
- this._baseObject.animation.play(animationName, times);
222
- }
223
-
224
- _setCommonFunctions() {
225
- this.stop = this._baseObject.animation.stop.bind(this._baseObject.animation);
226
- }
227
-
228
- _customDestroy() {
229
- this._pool.putElement(this._poolMember);
230
-
231
- if (this._baseObject.parent)
232
- this._baseObject.parent.removeChild(this._baseObject);
233
-
234
- this._baseObject = null;
235
- }
236
-
237
- _checkPool() {
238
- const pool = Urso.localData.get(POOL_NAME);
239
-
240
- if (pool)
241
- return pool;
242
-
243
- const newPool = new Urso.Game.Lib.ObjectPool(this._constructorFunction.bind(this), this._resetAnimationFunction.bind(this));
244
- Urso.localData.set(POOL_NAME, newPool);
245
-
246
- return newPool;
247
- }
248
- }
249
-
250
- module.exports = ModulesObjectsModelsDragonBones;