@safe-engine/cocos 1.2.2 → 1.3.5
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/@types/index.d.ts +2 -0
- package/@types/safex.d.ts +1 -3
- package/dist/dragonbones/PixiDragonBonesSprite.d.ts +9 -0
- package/dist/dragonbones/PixiDragonBonesSprite.d.ts.map +1 -0
- package/dist/dragonbones/PixiDragonBonesSprite.js +86 -0
- package/dist/dragonbones/index.d.ts +30 -16
- package/dist/dragonbones/index.d.ts.map +1 -1
- package/dist/dragonbones/index.js +73 -54
- package/dist/gworld/components/CollideComponent.d.ts.map +1 -1
- package/dist/gworld/components/CollideComponent.js +3 -0
- package/dist/gworld/components/EnhancedComponent.d.ts +1 -1
- package/dist/gworld/components/EnhancedComponent.d.ts.map +1 -1
- package/dist/gworld/components/GUIComponent.d.ts +15 -5
- package/dist/gworld/components/GUIComponent.d.ts.map +1 -1
- package/dist/gworld/components/GUIComponent.js +16 -1
- package/dist/gworld/components/NoRenderComponent.d.ts +2 -0
- package/dist/gworld/components/NoRenderComponent.d.ts.map +1 -1
- package/dist/gworld/components/NoRenderComponent.js +7 -0
- package/dist/gworld/components/NodeComp.d.ts +34 -66
- package/dist/gworld/components/NodeComp.d.ts.map +1 -1
- package/dist/gworld/components/NodeComp.js +28 -40
- package/dist/gworld/components/RenderComponent.d.ts +4 -4
- package/dist/gworld/components/RenderComponent.d.ts.map +1 -1
- package/dist/{helper → gworld/core}/NodePool.d.ts +1 -1
- package/dist/gworld/core/NodePool.d.ts.map +1 -0
- package/dist/{helper → gworld/core}/NodePool.js +2 -1
- package/dist/gworld/systems/AnimationSystem.d.ts +1 -2
- package/dist/gworld/systems/AnimationSystem.d.ts.map +1 -1
- package/dist/gworld/systems/AnimationSystem.js +6 -14
- package/dist/gworld/systems/CollideSystem.d.ts +3 -2
- package/dist/gworld/systems/CollideSystem.d.ts.map +1 -1
- package/dist/gworld/systems/CollideSystem.js +20 -32
- package/dist/gworld/systems/GUISystem.d.ts +11 -2
- package/dist/gworld/systems/GUISystem.d.ts.map +1 -1
- package/dist/gworld/systems/GUISystem.js +114 -126
- package/dist/gworld/systems/NoRenderSystem.d.ts +11 -2
- package/dist/gworld/systems/NoRenderSystem.d.ts.map +1 -1
- package/dist/gworld/systems/NoRenderSystem.js +65 -73
- package/dist/gworld/systems/RenderSystem.d.ts +9 -2
- package/dist/gworld/systems/RenderSystem.d.ts.map +1 -1
- package/dist/gworld/systems/RenderSystem.js +76 -97
- package/dist/helper/utils.d.ts +1 -2
- package/dist/helper/utils.d.ts.map +1 -1
- package/dist/helper/utils.js +10 -20
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/polyfills.d.ts +9 -9
- package/dist/polyfills.d.ts.map +1 -1
- package/dist/polyfills.js +1 -1
- package/package.json +3 -4
- package/dist/dragonbones/cocos/CocosArmatureDisplay.d.ts +0 -83
- package/dist/dragonbones/cocos/CocosArmatureDisplay.d.ts.map +0 -1
- package/dist/dragonbones/cocos/CocosArmatureDisplay.js +0 -259
- package/dist/dragonbones/cocos/CocosFactory.d.ts +0 -128
- package/dist/dragonbones/cocos/CocosFactory.d.ts.map +0 -1
- package/dist/dragonbones/cocos/CocosFactory.js +0 -225
- package/dist/dragonbones/cocos/CocosSlot.d.ts +0 -49
- package/dist/dragonbones/cocos/CocosSlot.d.ts.map +0 -1
- package/dist/dragonbones/cocos/CocosSlot.js +0 -385
- package/dist/dragonbones/cocos/CocosTextureAtlasData.d.ts +0 -53
- package/dist/dragonbones/cocos/CocosTextureAtlasData.d.ts.map +0 -1
- package/dist/dragonbones/cocos/CocosTextureAtlasData.js +0 -157
- package/dist/dragonbones/dragonBones.d.ts +0 -3
- package/dist/dragonbones/dragonBones.d.ts.map +0 -1
- package/dist/dragonbones/dragonBones.js +0 -4788
- package/dist/helper/NodePool.d.ts.map +0 -1
|
@@ -9,14 +9,15 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
9
9
|
children: NodeComp[];
|
|
10
10
|
name: string;
|
|
11
11
|
_group: any;
|
|
12
|
+
_active: boolean;
|
|
12
13
|
constructor(instance: C, entity: Entity);
|
|
13
14
|
get uuid(): number;
|
|
14
|
-
get position(): Vec2
|
|
15
|
+
get position(): Readonly<Vec2>;
|
|
15
16
|
set position(val: Vec2);
|
|
16
|
-
get
|
|
17
|
-
set
|
|
18
|
-
get
|
|
19
|
-
set
|
|
17
|
+
get posX(): number;
|
|
18
|
+
set posX(val: number);
|
|
19
|
+
get posY(): number;
|
|
20
|
+
set posY(val: number);
|
|
20
21
|
get scale(): number;
|
|
21
22
|
set scale(val: number);
|
|
22
23
|
get scaleX(): number;
|
|
@@ -27,28 +28,12 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
27
28
|
set anchorX(val: number);
|
|
28
29
|
get anchorY(): number;
|
|
29
30
|
set anchorY(val: number);
|
|
30
|
-
/**
|
|
31
|
-
* Returns the rotation of the node in radians. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
32
|
-
* @function
|
|
33
|
-
* @return {Number} The rotation of the node in radians.
|
|
34
|
-
*/
|
|
35
|
-
get rotation(): number;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* Sets the X rotation of the node in radians which performs a horizontal rotational skew.
|
|
39
|
-
* (support only in WebGL rendering mode)
|
|
40
|
-
* 0 is the default rotation angle.
|
|
41
|
-
* Positive values rotate node clockwise, and negative values for anti-clockwise.
|
|
42
|
-
*
|
|
43
|
-
* @param {Number} radians The X rotation in radians which performs a horizontal rotational skew.
|
|
44
|
-
*/
|
|
45
|
-
set rotation(val: number);
|
|
46
31
|
/**
|
|
47
32
|
* Returns the angle of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
48
33
|
* @function
|
|
49
34
|
* @return {Number} The rotation of the node in degrees.
|
|
50
35
|
*/
|
|
51
|
-
get
|
|
36
|
+
get rotation(): number;
|
|
52
37
|
/**
|
|
53
38
|
*
|
|
54
39
|
* Sets the X angle of the node in degrees which performs a horizontal rotational skew.
|
|
@@ -58,7 +43,7 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
58
43
|
*
|
|
59
44
|
* @param {Number} degrees The X rotation in degrees which performs a horizontal rotational skew.
|
|
60
45
|
*/
|
|
61
|
-
set
|
|
46
|
+
set rotation(val: number);
|
|
62
47
|
get color(): cc.Color;
|
|
63
48
|
set color(val: cc.Color);
|
|
64
49
|
get opacity(): number;
|
|
@@ -87,15 +72,15 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
87
72
|
convertToNodeSpace(point: cc.Point): {
|
|
88
73
|
x: number;
|
|
89
74
|
y: number;
|
|
90
|
-
equals(other:
|
|
91
|
-
add(value: cc.Point):
|
|
92
|
-
addSelf(value: cc.Point):
|
|
93
|
-
sub(value: cc.Point):
|
|
94
|
-
mul(multiply: number):
|
|
95
|
-
mulSelf(multiply: number):
|
|
75
|
+
equals(other: /*elided*/ any): boolean;
|
|
76
|
+
add(value: cc.Point | Vec2): /*elided*/ any;
|
|
77
|
+
addSelf(value: cc.Point | Vec2): /*elided*/ any;
|
|
78
|
+
sub(value: cc.Point | Vec2): /*elided*/ any;
|
|
79
|
+
mul(multiply: number): /*elided*/ any;
|
|
80
|
+
mulSelf(multiply: number): /*elided*/ any;
|
|
96
81
|
mag(): number;
|
|
97
|
-
normalizeSelf():
|
|
98
|
-
normalize():
|
|
82
|
+
normalizeSelf(): /*elided*/ any;
|
|
83
|
+
normalize(): /*elided*/ any;
|
|
99
84
|
cross(other: Vec2): number;
|
|
100
85
|
signAngle(other: Vec2): number;
|
|
101
86
|
lengthSqr(): number;
|
|
@@ -106,15 +91,15 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
106
91
|
convertToNodeSpaceAR(point: cc.Point): {
|
|
107
92
|
x: number;
|
|
108
93
|
y: number;
|
|
109
|
-
equals(other:
|
|
110
|
-
add(value: cc.Point):
|
|
111
|
-
addSelf(value: cc.Point):
|
|
112
|
-
sub(value: cc.Point):
|
|
113
|
-
mul(multiply: number):
|
|
114
|
-
mulSelf(multiply: number):
|
|
94
|
+
equals(other: /*elided*/ any): boolean;
|
|
95
|
+
add(value: cc.Point | Vec2): /*elided*/ any;
|
|
96
|
+
addSelf(value: cc.Point | Vec2): /*elided*/ any;
|
|
97
|
+
sub(value: cc.Point | Vec2): /*elided*/ any;
|
|
98
|
+
mul(multiply: number): /*elided*/ any;
|
|
99
|
+
mulSelf(multiply: number): /*elided*/ any;
|
|
115
100
|
mag(): number;
|
|
116
|
-
normalizeSelf():
|
|
117
|
-
normalize():
|
|
101
|
+
normalizeSelf(): /*elided*/ any;
|
|
102
|
+
normalize(): /*elided*/ any;
|
|
118
103
|
cross(other: Vec2): number;
|
|
119
104
|
signAngle(other: Vec2): number;
|
|
120
105
|
lengthSqr(): number;
|
|
@@ -125,34 +110,15 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
125
110
|
convertToWorldSpaceAR(point: cc.Vec2): {
|
|
126
111
|
x: number;
|
|
127
112
|
y: number;
|
|
128
|
-
equals(other:
|
|
129
|
-
add(value: cc.Point):
|
|
130
|
-
addSelf(value: cc.Point):
|
|
131
|
-
sub(value: cc.Point):
|
|
132
|
-
mul(multiply: number):
|
|
133
|
-
mulSelf(multiply: number):
|
|
134
|
-
mag(): number;
|
|
135
|
-
normalizeSelf(): cc.Vec2;
|
|
136
|
-
normalize(): cc.Vec2;
|
|
137
|
-
cross(other: Vec2): number;
|
|
138
|
-
signAngle(other: Vec2): number;
|
|
139
|
-
lengthSqr(): number;
|
|
140
|
-
dot(other: Vec2): number;
|
|
141
|
-
angle(other: Vec2): number;
|
|
142
|
-
distance(other: /*elided*/ any): number;
|
|
143
|
-
};
|
|
144
|
-
getPosition(): {
|
|
145
|
-
x: number;
|
|
146
|
-
y: number;
|
|
147
|
-
equals(other: cc.Vec2): boolean;
|
|
148
|
-
add(value: cc.Point): cc.Vec2;
|
|
149
|
-
addSelf(value: cc.Point): cc.Vec2;
|
|
150
|
-
sub(value: cc.Point): cc.Vec2;
|
|
151
|
-
mul(multiply: number): cc.Vec2;
|
|
152
|
-
mulSelf(multiply: number): cc.Vec2;
|
|
113
|
+
equals(other: /*elided*/ any): boolean;
|
|
114
|
+
add(value: cc.Point | Vec2): /*elided*/ any;
|
|
115
|
+
addSelf(value: cc.Point | Vec2): /*elided*/ any;
|
|
116
|
+
sub(value: cc.Point | Vec2): /*elided*/ any;
|
|
117
|
+
mul(multiply: number): /*elided*/ any;
|
|
118
|
+
mulSelf(multiply: number): /*elided*/ any;
|
|
153
119
|
mag(): number;
|
|
154
|
-
normalizeSelf():
|
|
155
|
-
normalize():
|
|
120
|
+
normalizeSelf(): /*elided*/ any;
|
|
121
|
+
normalize(): /*elided*/ any;
|
|
156
122
|
cross(other: Vec2): number;
|
|
157
123
|
signAngle(other: Vec2): number;
|
|
158
124
|
lengthSqr(): number;
|
|
@@ -160,6 +126,7 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
160
126
|
angle(other: Vec2): number;
|
|
161
127
|
distance(other: /*elided*/ any): number;
|
|
162
128
|
};
|
|
129
|
+
getPosition(): cc.Point;
|
|
163
130
|
setPosition(x: number | cc.Vec2 | cc.Vec3 | cc.Point, y?: number): void;
|
|
164
131
|
setRotation(deg: number): void;
|
|
165
132
|
getRotation(): number;
|
|
@@ -179,6 +146,7 @@ export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
|
179
146
|
removeAllChildren(cleanup?: any): void;
|
|
180
147
|
getData<T>(key: string): T;
|
|
181
148
|
setData<T extends Integer | Float | string>(key: string, value: T): void;
|
|
149
|
+
removeData(key: string): void;
|
|
182
150
|
resolveComponent(component: EnhancedComponent<object, NodeComp>): void;
|
|
183
151
|
}
|
|
184
152
|
//# sourceMappingURL=NodeComp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeComp.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/NodeComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIhD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAA;AACjD,qBAAa,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,CAAA;IACX,MAAM,EAAE,QAAQ,CAAA;IAChB,QAAQ,EAAE,QAAQ,EAAE,CAAK;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,MAAA;
|
|
1
|
+
{"version":3,"file":"NodeComp.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/NodeComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIhD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAA;AACjD,qBAAa,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,CAAA;IACX,MAAM,EAAE,QAAQ,CAAA;IAChB,QAAQ,EAAE,QAAQ,EAAE,CAAK;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,MAAA;IACN,OAAO,UAAO;gBAEF,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM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AAI,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM;IAIhE,WAAW,CAAC,GAAG,EAAE,MAAM;IAIvB,WAAW;IAIX,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM;IAInD,cAAc;IAId,cAAc;IAQd,cAAc;IAId,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAatD,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IAIxB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAIxC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc;IAIhC,cAAc;IAId,0BAA0B;IAK1B,2BAA2B;IAK3B,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO;IAiBlC,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAQvD,iBAAiB,CAAC,OAAO,CAAC,KAAA;IAM1B,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC;IAM1B,OAAO,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAQjE,UAAU,CAAC,GAAG,EAAE,MAAM;IAOtB,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC;CAOhE"}
|
|
@@ -11,6 +11,7 @@ var NoRenderComponent_1 = require("./NoRenderComponent");
|
|
|
11
11
|
var NodeComp = /** @class */ (function () {
|
|
12
12
|
function NodeComp(instance, entity) {
|
|
13
13
|
this.children = [];
|
|
14
|
+
this._active = true;
|
|
14
15
|
this.entity = entity;
|
|
15
16
|
this.instance = instance;
|
|
16
17
|
}
|
|
@@ -23,15 +24,15 @@ var NodeComp = /** @class */ (function () {
|
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(NodeComp.prototype, "position", {
|
|
25
26
|
get: function () {
|
|
26
|
-
return this.getPosition();
|
|
27
|
+
return (0, polyfills_1.Vec2)(this.instance.getPosition());
|
|
27
28
|
},
|
|
28
29
|
set: function (val) {
|
|
29
|
-
this.setPosition(val.x, val.y);
|
|
30
|
+
this.instance.setPosition(val.x, val.y);
|
|
30
31
|
},
|
|
31
32
|
enumerable: false,
|
|
32
33
|
configurable: true
|
|
33
34
|
});
|
|
34
|
-
Object.defineProperty(NodeComp.prototype, "
|
|
35
|
+
Object.defineProperty(NodeComp.prototype, "posX", {
|
|
35
36
|
get: function () {
|
|
36
37
|
return this.instance.getPositionX();
|
|
37
38
|
},
|
|
@@ -41,7 +42,7 @@ var NodeComp = /** @class */ (function () {
|
|
|
41
42
|
enumerable: false,
|
|
42
43
|
configurable: true
|
|
43
44
|
});
|
|
44
|
-
Object.defineProperty(NodeComp.prototype, "
|
|
45
|
+
Object.defineProperty(NodeComp.prototype, "posY", {
|
|
45
46
|
get: function () {
|
|
46
47
|
return this.instance.getPositionY();
|
|
47
48
|
},
|
|
@@ -102,30 +103,6 @@ var NodeComp = /** @class */ (function () {
|
|
|
102
103
|
configurable: true
|
|
103
104
|
});
|
|
104
105
|
Object.defineProperty(NodeComp.prototype, "rotation", {
|
|
105
|
-
/**
|
|
106
|
-
* Returns the rotation of the node in radians. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
107
|
-
* @function
|
|
108
|
-
* @return {Number} The rotation of the node in radians.
|
|
109
|
-
*/
|
|
110
|
-
get: function () {
|
|
111
|
-
return cc.degreesToRadians(this.instance.getRotation());
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* Sets the X rotation of the node in radians which performs a horizontal rotational skew.
|
|
116
|
-
* (support only in WebGL rendering mode)
|
|
117
|
-
* 0 is the default rotation angle.
|
|
118
|
-
* Positive values rotate node clockwise, and negative values for anti-clockwise.
|
|
119
|
-
*
|
|
120
|
-
* @param {Number} radians The X rotation in radians which performs a horizontal rotational skew.
|
|
121
|
-
*/
|
|
122
|
-
set: function (val) {
|
|
123
|
-
this.instance.setRotation(cc.radiansToDegrees(val));
|
|
124
|
-
},
|
|
125
|
-
enumerable: false,
|
|
126
|
-
configurable: true
|
|
127
|
-
});
|
|
128
|
-
Object.defineProperty(NodeComp.prototype, "angle", {
|
|
129
106
|
/**
|
|
130
107
|
* Returns the angle of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
131
108
|
* @function
|
|
@@ -171,12 +148,21 @@ var NodeComp = /** @class */ (function () {
|
|
|
171
148
|
});
|
|
172
149
|
Object.defineProperty(NodeComp.prototype, "active", {
|
|
173
150
|
get: function () {
|
|
174
|
-
|
|
151
|
+
if (!cc.sys.isObjectValid(this.instance) || !this._active)
|
|
152
|
+
return false;
|
|
153
|
+
var p = this.parent;
|
|
154
|
+
while (p) {
|
|
155
|
+
if (!p.active)
|
|
156
|
+
return false;
|
|
157
|
+
p = p.parent;
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
175
160
|
},
|
|
176
161
|
set: function (val) {
|
|
177
162
|
if (!cc.sys.isObjectValid(this.instance)) {
|
|
178
163
|
return;
|
|
179
164
|
}
|
|
165
|
+
this._active = val;
|
|
180
166
|
if (this.instance instanceof ccui.Widget) {
|
|
181
167
|
this.instance.setEnabled(val);
|
|
182
168
|
}
|
|
@@ -301,17 +287,10 @@ var NodeComp = /** @class */ (function () {
|
|
|
301
287
|
return (0, polyfills_1.Vec2)(x, y);
|
|
302
288
|
};
|
|
303
289
|
NodeComp.prototype.getPosition = function () {
|
|
304
|
-
return
|
|
290
|
+
return this.instance.getPosition();
|
|
305
291
|
};
|
|
306
292
|
NodeComp.prototype.setPosition = function (x, y) {
|
|
307
|
-
|
|
308
|
-
this.x = x.x;
|
|
309
|
-
this.y = x.y;
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
this.x = x;
|
|
313
|
-
this.y = y;
|
|
314
|
-
}
|
|
293
|
+
this.instance.setPosition(x, y);
|
|
315
294
|
};
|
|
316
295
|
NodeComp.prototype.setRotation = function (deg) {
|
|
317
296
|
this.instance.setRotation(deg);
|
|
@@ -369,6 +348,7 @@ var NodeComp = /** @class */ (function () {
|
|
|
369
348
|
};
|
|
370
349
|
NodeComp.prototype.removeFromParent = function (cleanup) {
|
|
371
350
|
var _this = this;
|
|
351
|
+
this.active = false;
|
|
372
352
|
if (this.parent) {
|
|
373
353
|
(0, remove_1.default)(this.parent.children, function (_a) {
|
|
374
354
|
var entity = _a.entity;
|
|
@@ -384,18 +364,20 @@ var NodeComp = /** @class */ (function () {
|
|
|
384
364
|
this.instance.removeFromParent(cleanup);
|
|
385
365
|
}
|
|
386
366
|
else {
|
|
387
|
-
this.active = false;
|
|
388
367
|
this.stopAllActions();
|
|
389
368
|
this.instance.removeFromParent();
|
|
390
369
|
}
|
|
391
370
|
};
|
|
392
371
|
NodeComp.prototype.addChild = function (child) {
|
|
372
|
+
child._active = true;
|
|
393
373
|
child.parent = this;
|
|
394
374
|
this.children.push(child);
|
|
395
375
|
this.instance.addChild(child.instance);
|
|
396
376
|
};
|
|
397
377
|
NodeComp.prototype.removeAllChildren = function (cleanup) {
|
|
398
|
-
this.
|
|
378
|
+
this.children.forEach(function (child) {
|
|
379
|
+
child.removeFromParent(cleanup);
|
|
380
|
+
});
|
|
399
381
|
};
|
|
400
382
|
NodeComp.prototype.getData = function (key) {
|
|
401
383
|
var data = this.getComponent(NoRenderComponent_1.ExtraDataComp);
|
|
@@ -412,6 +394,12 @@ var NodeComp = /** @class */ (function () {
|
|
|
412
394
|
data.setData(key, value);
|
|
413
395
|
}
|
|
414
396
|
};
|
|
397
|
+
NodeComp.prototype.removeData = function (key) {
|
|
398
|
+
var data = this.getComponent(NoRenderComponent_1.ExtraDataComp);
|
|
399
|
+
if (data) {
|
|
400
|
+
data.removeData(key);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
415
403
|
NodeComp.prototype.resolveComponent = function (component) {
|
|
416
404
|
if (component.constructor.hasRender) {
|
|
417
405
|
this.addChild(component.node);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseComponentProps, GraphicsRenderProps, SpineData } from '../../../@types/safex';
|
|
2
2
|
import { ComponentX } from '../core/decorator';
|
|
3
3
|
export declare class NodeRender extends ComponentX {
|
|
4
4
|
nodeName: string;
|
|
@@ -8,7 +8,7 @@ interface SpriteRenderProps {
|
|
|
8
8
|
texType?: number;
|
|
9
9
|
type?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare class SpriteRender extends ComponentX<SpriteRenderProps &
|
|
11
|
+
export declare class SpriteRender extends ComponentX<SpriteRenderProps & BaseComponentProps<SpriteRender>, cc.Sprite> {
|
|
12
12
|
get spriteFrame(): string;
|
|
13
13
|
set spriteFrame(frame: string);
|
|
14
14
|
}
|
|
@@ -31,7 +31,7 @@ interface SpineSkeletonProps {
|
|
|
31
31
|
timeScale?: number;
|
|
32
32
|
loop?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps &
|
|
34
|
+
export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps & BaseComponentProps<SpineSkeleton>> {
|
|
35
35
|
data: SpineData;
|
|
36
36
|
skin: string;
|
|
37
37
|
animation: string;
|
|
@@ -40,7 +40,7 @@ export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps & RefCo
|
|
|
40
40
|
setAnimation(name: string, loop?: boolean): void;
|
|
41
41
|
setSkeletonData(data: string): void;
|
|
42
42
|
}
|
|
43
|
-
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps &
|
|
43
|
+
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps & BaseComponentProps<GraphicsRender>, cc.DrawNode> {
|
|
44
44
|
lineWidth: number;
|
|
45
45
|
strokeColor: cc.Color;
|
|
46
46
|
fillColor: cc.Color;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAE1F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,qBAAa,UAAW,SAAQ,UAAU;IACxC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,YAAa,SAAQ,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC;IAC3G,IAAI,WAAW,WAEd;IAED,IAAI,WAAW,CAAC,KAAK,QAAA,EAepB;CACF;AACD,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,qBAAa,UAAW,SAAQ,UAAU,CAAC,eAAe,EAAE,EAAE,CAAC,YAAY,CAAC;CAAI;AAEhF,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAA;CAClB;AACD,qBAAa,YAAa,SAAQ,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,cAAc,CAAC;CAAI;AAEtF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA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= /** @class */ (function () {
|
|
|
7
7
|
}
|
|
8
8
|
NodePool.prototype.put = function (node) {
|
|
9
9
|
if (node) {
|
|
10
|
-
node.active = false;
|
|
11
10
|
node.removeFromParent();
|
|
11
|
+
node.entity.immortal = true;
|
|
12
12
|
this.items.push(node);
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
NodePool.prototype.get = function () {
|
|
16
16
|
var node = this.items.pop();
|
|
17
|
+
node.entity.immortal = false;
|
|
17
18
|
node.active = true;
|
|
18
19
|
return node;
|
|
19
20
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { EntityManager, EventManager,
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
2
|
export declare class AnimationSystem implements System {
|
|
3
3
|
configure(event_manager: EventManager): void;
|
|
4
|
-
receive(type: string, event: EventReceive): void;
|
|
5
4
|
update(entities: EntityManager, events: EventManager, dt: Float): void;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=AnimationSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/AnimationSystem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/AnimationSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAc,MAAM,EAAE,MAAM,YAAY,CAAA;AAI5E,qBAAa,eAAgB,YAAW,MAAM;IAC5C,SAAS,CAAC,aAAa,EAAE,YAAY;IAQrC,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK;CAUhE"}
|
|
@@ -8,20 +8,12 @@ var AnimationSystem = /** @class */ (function () {
|
|
|
8
8
|
function AnimationSystem() {
|
|
9
9
|
}
|
|
10
10
|
AnimationSystem.prototype.configure = function (event_manager) {
|
|
11
|
-
event_manager.subscribe(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var animation = event.entity.getComponent(AnimationComponent_1.AnimationComp);
|
|
18
|
-
animation.node = event.entity.getComponent(NodeComp_1.NodeComp);
|
|
19
|
-
setTimeout(animation.start.bind(animation), 0);
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
default:
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
11
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, AnimationComponent_1.AnimationComp, function (_a) {
|
|
12
|
+
var entity = _a.entity;
|
|
13
|
+
var animation = entity.getComponent(AnimationComponent_1.AnimationComp);
|
|
14
|
+
animation.node = entity.getComponent(NodeComp_1.NodeComp);
|
|
15
|
+
setTimeout(animation.start.bind(animation), 0);
|
|
16
|
+
});
|
|
25
17
|
};
|
|
26
18
|
AnimationSystem.prototype.update = function (entities, events, dt) {
|
|
27
19
|
var animations = entities.entities_with_components(AnimationComponent_1.AnimationComp);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityManager, EventManager,
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
2
|
import { Collider, Contract } from '../components/CollideComponent';
|
|
3
3
|
export declare class CollideSystem implements System {
|
|
4
4
|
listColliders: Collider[];
|
|
@@ -9,7 +9,8 @@ export declare class CollideSystem implements System {
|
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
colliderMatrix: boolean[][];
|
|
11
11
|
configure(event_manager: EventManager): void;
|
|
12
|
-
|
|
12
|
+
private onAddCollider;
|
|
13
|
+
private onRemoveCollider;
|
|
13
14
|
update(entities: EntityManager, events: EventManager, dt: number): void;
|
|
14
15
|
addCollider(collider: Collider): void;
|
|
15
16
|
removeCollider(collider: Collider): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollideSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/CollideSystem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CollideSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/CollideSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAc,MAAM,EAAE,MAAM,YAAY,CAAA;AAG5E,OAAO,EAA+B,QAAQ,EAAiB,QAAQ,EAAmB,MAAM,gCAAgC,CAAA;AAGhI,qBAAa,aAAc,YAAW,MAAM;IAC1C,aAAa,EAAE,QAAQ,EAAE,CAAK;IAC9B,UAAU,EAAE,QAAQ,EAAE,CAAK;IAC3B,eAAe,QAAK;IACpB,aAAa,EAAE,EAAE,CAAC,QAAQ,CAAA;IAC1B,gBAAgB,UAAQ;IACxB,OAAO,UAAO;IACd,cAAc,cAAW;IAEzB,SAAS,CAAC,aAAa,EAAE,YAAY;IASrC,OAAO,CAAC,aAAa,CAOpB;IAED,OAAO,CAAC,gBAAgB,CAEvB;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;IA2GhE,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAS9B,cAAc,CAAC,QAAQ,EAAE,QAAQ;IAIjC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK;IAK3B,eAAe,CAAC,MAAM,UAAO;CAI9B"}
|
|
@@ -7,46 +7,34 @@ var CollideComponent_1 = require("../components/CollideComponent");
|
|
|
7
7
|
var NodeComp_1 = require("../components/NodeComp");
|
|
8
8
|
var CollideSystem = /** @class */ (function () {
|
|
9
9
|
function CollideSystem() {
|
|
10
|
+
var _this = this;
|
|
10
11
|
this.listColliders = [];
|
|
11
12
|
this._contracts = [];
|
|
12
13
|
this.removeColliders = [];
|
|
13
14
|
this.enabledDebugDraw = false;
|
|
14
15
|
this.enabled = true;
|
|
15
16
|
this.colliderMatrix = [[true]];
|
|
17
|
+
this.onAddCollider = function (_a) {
|
|
18
|
+
var entity = _a.entity, component = _a.component;
|
|
19
|
+
var collider = entity.assign(new CollideComponent_1.Collider(component));
|
|
20
|
+
collider.node = entity.getComponent(NodeComp_1.NodeComp);
|
|
21
|
+
collider.props = component.props;
|
|
22
|
+
// collider.props.enable = true
|
|
23
|
+
component.node = entity.getComponent(NodeComp_1.NodeComp);
|
|
24
|
+
_this.addCollider(collider);
|
|
25
|
+
};
|
|
26
|
+
this.onRemoveCollider = function (_a) {
|
|
27
|
+
var entity = _a.entity, component = _a.component;
|
|
28
|
+
_this.removeColliders.push(component.getComponent(CollideComponent_1.Collider));
|
|
29
|
+
};
|
|
16
30
|
}
|
|
17
31
|
CollideSystem.prototype.configure = function (event_manager) {
|
|
18
|
-
event_manager.subscribe(
|
|
19
|
-
event_manager.subscribe(
|
|
20
|
-
event_manager.subscribe(
|
|
21
|
-
event_manager.subscribe(
|
|
22
|
-
event_manager.subscribe(
|
|
23
|
-
event_manager.subscribe(
|
|
24
|
-
};
|
|
25
|
-
CollideSystem.prototype.receive = function (type, event) {
|
|
26
|
-
var ett = event.entity;
|
|
27
|
-
var comp = event.component;
|
|
28
|
-
switch (type) {
|
|
29
|
-
case (0, entityx_ts_1.ComponentAddedEvent)(CollideComponent_1.BoxCollider):
|
|
30
|
-
case (0, entityx_ts_1.ComponentAddedEvent)(CollideComponent_1.CircleCollider):
|
|
31
|
-
case (0, entityx_ts_1.ComponentAddedEvent)(CollideComponent_1.PolygonCollider): {
|
|
32
|
-
// cc.log(type, event)
|
|
33
|
-
var collider = ett.assign(new CollideComponent_1.Collider(comp));
|
|
34
|
-
collider.node = ett.getComponent(NodeComp_1.NodeComp);
|
|
35
|
-
collider.props = comp.props;
|
|
36
|
-
// collider.props.enable = true
|
|
37
|
-
comp.node = ett.getComponent(NodeComp_1.NodeComp);
|
|
38
|
-
this.addCollider(collider);
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
case (0, entityx_ts_1.ComponentRemovedEvent)(CollideComponent_1.BoxCollider):
|
|
42
|
-
case (0, entityx_ts_1.ComponentRemovedEvent)(CollideComponent_1.CircleCollider):
|
|
43
|
-
case (0, entityx_ts_1.ComponentRemovedEvent)(CollideComponent_1.PolygonCollider): {
|
|
44
|
-
this.removeColliders.push(comp.getComponent(CollideComponent_1.Collider));
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
default:
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
32
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.BoxCollider, this.onAddCollider.bind(this));
|
|
33
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.CircleCollider, this.onAddCollider.bind(this));
|
|
34
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.PolygonCollider, this.onAddCollider.bind(this));
|
|
35
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.BoxCollider, this.onRemoveCollider.bind(this));
|
|
36
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.CircleCollider, this.onRemoveCollider.bind(this));
|
|
37
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.PolygonCollider, this.onRemoveCollider.bind(this));
|
|
50
38
|
};
|
|
51
39
|
CollideSystem.prototype.update = function (entities, events, dt) {
|
|
52
40
|
var _this = this;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { EntityManager, EventManager,
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
2
|
export declare class GUISystem implements System {
|
|
3
|
+
defaultFont: string;
|
|
3
4
|
configure(event_manager: EventManager): void;
|
|
4
|
-
|
|
5
|
+
private onAddButtonComp;
|
|
6
|
+
private onAddProgressTimerComp;
|
|
7
|
+
private onAddLabelComp;
|
|
8
|
+
private onAddLabelOutlineComp;
|
|
9
|
+
private onAddLabelShadowComp;
|
|
10
|
+
private onAddRichTextComp;
|
|
11
|
+
private onAddScrollViewComp;
|
|
12
|
+
private onAddBlockInputEventsComp;
|
|
13
|
+
private onAddInputComp;
|
|
5
14
|
update(entities: EntityManager, events: EventManager, dt: number): any;
|
|
6
15
|
}
|
|
7
16
|
//# sourceMappingURL=GUISystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/GUISystem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/GUISystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAkBlG,qBAAa,SAAU,YAAW,MAAM;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,aAAa,EAAE,YAAY;IAYrC,OAAO,CAAC,eAAe,CAuBtB;IAED,OAAO,CAAC,sBAAsB,CAa7B;IAED,OAAO,CAAC,cAAc,CAMrB;IAED,OAAO,CAAC,qBAAqB,CAM5B;IAED,OAAO,CAAC,oBAAoB,CAM3B;IAED,OAAO,CAAC,iBAAiB,CAQxB;IAED,OAAO,CAAC,mBAAmB,CAU1B;IAED,OAAO,CAAC,yBAAyB,CAOhC;IAED,OAAO,CAAC,cAAc,CAWrB;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE"}
|