@ives_xxz/framework 2.1.16 → 2.1.17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": ["123456"],
@@ -1,8 +1,6 @@
1
- import FWObject from './FWObject';
2
-
3
1
  const POOL_DISABLE_POSITION: cc.Vec3 = cc.v3(50000, 50000);
4
2
 
5
- export class FWObjectPool<T extends FWObject = FWObject> implements FW.ObjectPool {
3
+ export class FWObjectPool<T extends FW.Object = FW.Object> implements FW.ObjectPool {
6
4
  private uniqueId: number;
7
5
  private type: FW.SystemDefine.FWObjectType;
8
6
  private enablePoolMap: Map<number, FW.ObjectProperty>;
@@ -51,7 +49,7 @@ export class FWObjectPool<T extends FWObject = FWObject> implements FW.ObjectPoo
51
49
  if (property.node.uuid == uuid) {
52
50
  return property;
53
51
  }
54
- } else if (arguments[0] instanceof FWObject) {
52
+ } else if (arguments[0] instanceof FW.Object) {
55
53
  if (uniqueId == arguments[0]?.uniqueId) {
56
54
  return property;
57
55
  }
@@ -77,7 +75,7 @@ export class FWObjectPool<T extends FWObject = FWObject> implements FW.ObjectPoo
77
75
  };
78
76
  if (this.isEmpty()) {
79
77
  node = cc.instantiate(this.node);
80
- element = (node.getComponent(FWObject) as T) || undefined;
78
+ element = (node.getComponent(FW.Object) as T) || undefined;
81
79
  ObjectProperty.uniqueId = ++this.uniqueId;
82
80
  ObjectProperty.node = node;
83
81
  ObjectProperty.component = element;
@@ -142,7 +140,7 @@ export class FWObjectPool<T extends FWObject = FWObject> implements FW.ObjectPoo
142
140
  let property: FW.ObjectProperty = this.findObjectProperty(arguments[0]);
143
141
 
144
142
  const node: cc.Node = property.node;
145
- const element = (node.getComponent(FWObject) as T) || undefined;
143
+ const element = (node.getComponent(FW.Object) as T) || undefined;
146
144
 
147
145
  if (!cc.isValid(node)) {
148
146
  return;