@ives_xxz/framework 1.3.0 → 1.3.2
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/CC.d.ts +121 -0
- package/CC.d.ts.meta +10 -0
- package/FW.d.ts +1 -2
- package/expand/FWNodeExpand.ts +147 -0
- package/expand/FWNodeExpand.ts.meta +10 -0
- package/package.json +1 -1
package/CC.d.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
declare namespace cc {
|
|
2
|
+
interface Node {
|
|
3
|
+
/** 子节点获取 */
|
|
4
|
+
child(path: string, autoUpdate?: boolean): cc.Node;
|
|
5
|
+
/** 龙骨动画 */
|
|
6
|
+
dragon_bones: dragonBones.ArmatureDisplay;
|
|
7
|
+
/**图形 */
|
|
8
|
+
graphics: cc.Graphics;
|
|
9
|
+
/**!#en The Label Component. !#zh 文字标签组件 */
|
|
10
|
+
label: cc.Label;
|
|
11
|
+
/**!#en Outline effect used to change the display, only for system fonts or TTF fonts !#zh 描边效果组件,用于字体描边,只能用于系统字体 */
|
|
12
|
+
label_outline: cc.LabelOutline;
|
|
13
|
+
/**!#en Shadow effect for Label component, only for system fonts or TTF fonts !#zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体 */
|
|
14
|
+
label_shadow: cc.LabelShadow;
|
|
15
|
+
/**!#en The Light Component!#zh 光源组件 */
|
|
16
|
+
light: cc.Light;
|
|
17
|
+
/**!#en The Mask Component !#zh 遮罩组件 */
|
|
18
|
+
mask: cc.Mask;
|
|
19
|
+
particle_system: cc.ParticleSystem;
|
|
20
|
+
/**!#en The ParticleSystem3D Component. !#zh 3D 粒子组件 */
|
|
21
|
+
particle_system_3d: cc.ParticleSystem3D;
|
|
22
|
+
/**!#en The RichText Component. !#zh 富文本组件 */
|
|
23
|
+
rich_text: cc.RichText;
|
|
24
|
+
/**!#en The skeleton of Spine (Skeleton has a reference to a SkeletonData and stores the state for skeleton instance, which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible. Multiple skeletons can use the same SkeletonData which includes all animations, skins, and attachments.) !#zh Spine 骨骼动画 (Skeleton 具有对骨骼数据的引用并且存储了骨骼实例的状态, 它由当前的骨骼动作,slot 颜色,和可见的 slot attachments 组成。 多个 Skeleton 可以使用相同的骨骼数据,其中包括所有的动画,皮肤和 attachments。 */
|
|
25
|
+
sp_skeleton: sp.Skeleton;
|
|
26
|
+
/**!#en Renders a sprite in the scene. !#zh 该组件用于在场景中渲染精灵 */
|
|
27
|
+
sprite: cc.Sprite;
|
|
28
|
+
/**!#en Renders a TMX Tile Map in the scene. !#zh 在场景中渲染一个 tmx 格式的 Tile Map。 */
|
|
29
|
+
tiled_map: cc.TiledMap;
|
|
30
|
+
/**!#en TiledTile can control the specified map tile. It will apply the node rotation, scale, translate to the map tile. You can change the TiledTile's gid to change the map tile's style. !#zh TiledTile 可以单独对某一个地图块进行操作。 他会将节点的旋转,缩放,平移操作应用在这个地图块上,并可以通过更换当前地图块的 gid 来更换地图块的显示样式。 */
|
|
31
|
+
tiled_tile: cc.TiledTile;
|
|
32
|
+
/**!#en Mesh Renderer Component !#zh 网格渲染组件 */
|
|
33
|
+
mesh_renderer: cc.MeshRenderer;
|
|
34
|
+
/**!#en Skinned Mesh Renderer !#zh 蒙皮渲染组件 */
|
|
35
|
+
skinned_mesh_renderer: cc.SkinnedMeshRenderer;
|
|
36
|
+
/**!#en This component will block all input events (mouse and touch) within the bounding box of the node, preventing the input from penetrating into the underlying node, typically for the background of the top UI. This component does not have any API interface and can be added directly to the scene to take effect. !#zh 该组件将拦截所属节点 bounding box 内的所有输入事件(鼠标和触摸),防止输入穿透到下层节点,一般用于上层 UI 的背景。 该组件没有任何 API 接口,直接添加到场景即可生效 */
|
|
37
|
+
block_input_events: cc.BlockInputEvents;
|
|
38
|
+
button: cc.Button;
|
|
39
|
+
/**!#zh: 作为 UI 根节点,为所有子节点提供视窗四边的位置信息以供对齐,另外提供屏幕适配策略接口,方便从编辑器设置。 注:由于本节点的尺寸会跟随屏幕拉伸,所以 anchorPoint 只支持 (0.5, 0.5),否则适配不同屏幕时坐标会有偏差。 */
|
|
40
|
+
canvas: cc.Canvas;
|
|
41
|
+
/**!#en cc.EditBox is a component for inputing text, you can use it to gather small amounts of text from users. !#zh EditBox 组件,用于获取用户的输入文本。 */
|
|
42
|
+
edit_box: cc.EditBox;
|
|
43
|
+
/**!#en The Layout is a container component, use it to arrange child elements easily. Note: 1.Scaling and rotation of child nodes are not considered. 2.After setting the Layout, the results need to be updated until the next frame, unless you manually call {{#crossLink "Layout/updateLayout:method"}}{{/crossLink}}。 !#zh Layout 组件相当于一个容器,能自动对它的所有子节点进行统一排版。 注意: 1.不会考虑子节点的缩放和旋转。 2.对 Layout 设置后结果需要到下一帧才会更新,除非你设置完以后手动调用 {{#crossLink "Layout/updateLayout:method"}}{{/crossLink}}。 */
|
|
44
|
+
layout: cc.Layout;
|
|
45
|
+
/**!#en The PageView control !#zh 页面视图组件 */
|
|
46
|
+
page_view: cc.PageView;
|
|
47
|
+
/**!#en The Page View Indicator Component !#zh 页面视图每页标记组件 */
|
|
48
|
+
page_view_indicator: cc.PageViewIndicator;
|
|
49
|
+
/**!#en Visual indicator of progress in some operation. Displays a bar to the user representing how far the operation has progressed. !#zh 进度条组件,可用于显示加载资源时的进度。 */
|
|
50
|
+
progress_bar: cc.ProgressBar;
|
|
51
|
+
/**!#en The Scrollbar control allows the user to scroll an image or other view that is too large to see completely !#zh 滚动条组件 */
|
|
52
|
+
scroll_bar: cc.Scrollbar;
|
|
53
|
+
/**!#en Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display.!#zh 滚动视图组件 */
|
|
54
|
+
scroll_view: cc.ScrollView;
|
|
55
|
+
/**!#en The Slider Control !#zh 滑动器组件 */
|
|
56
|
+
slider: cc.Slider;
|
|
57
|
+
/**!#en The toggle component is a CheckBox, when it used together with a ToggleGroup, it could be treated as a RadioButton. !#zh Toggle 是一个 CheckBox,当它和 ToggleGroup 一起使用的时候,可以变成 RadioButton */
|
|
58
|
+
toggle: cc.Toggle;
|
|
59
|
+
/**!#en ToggleContainer is not a visiable UI component but a way to modify the behavior of a set of Toggles. Toggles that belong to the same group could only have one of them to be switched on at a time. Note: All the first layer child node containing the toggle component will auto be added to the container !#zh ToggleContainer 不是一个可见的 UI 组件,它可以用来修改一组 Toggle 组件的行为。 当一组 Toggle 属于同一个 ToggleContainer 的时候,任何时候只能有一个 Toggle 处于选中状态。 注意:所有包含 Toggle 组件的一级子节点都会自动被添加到该容器中 */
|
|
60
|
+
toggle_container: cc.ToggleContainer;
|
|
61
|
+
/**!#en cc.VideoPlayer is a component for playing videos, you can use it for showing videos in your game. Because different platforms have different authorization, API and control methods for VideoPlayer component. And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported. !#zh Video 组件,用于在游戏中播放视频。由于不同平台对于 VideoPlayer 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 */
|
|
62
|
+
video_player: cc.VideoPlayer;
|
|
63
|
+
/**!#en cc.WebView is a component for display web pages in the game. Because different platforms have different authorization, API and control methods for WebView component. And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported. !#zh WebView 组件,用于在游戏中显示网页。由于不同平台对于 WebView 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 */
|
|
64
|
+
web_view: cc.WebView;
|
|
65
|
+
/**!#en Stores and manipulate the anchoring based on its parent. Widget are used for GUI but can also be used for other things. Widget will adjust current node's position and size automatically, but the results after adjustment can not be obtained until the next frame unless you call {{#crossLink "Widget/updateAlignment:method"}}{{/crossLink}} manually. !#zh Widget 组件,用于设置和适配其相对于父节点的边距,Widget 通常被用于 UI 界面,也可以用于其他地方。 Widget 会自动调整当前节点的坐标和宽高,不过目前调整后的结果要到下一帧才能在脚本里获取到,除非你先手动调用 {{#crossLink "Widget/updateAlignment:method"}}{{/crossLink}}。 */
|
|
66
|
+
widget: cc.Widget;
|
|
67
|
+
/**!#en Box Collider. !#zh 包围盒碰撞组件 */
|
|
68
|
+
box_collider: cc.BoxCollider;
|
|
69
|
+
/**!#en Circle Collider. !#zh 圆形碰撞组件 */
|
|
70
|
+
circle_collider: cc.CircleCollider;
|
|
71
|
+
/**!#en Polygon Collider. !#zh 多边形碰撞组件 */
|
|
72
|
+
polygon_collider: cc.PolygonCollider;
|
|
73
|
+
/**物理盒碰撞组件 */
|
|
74
|
+
physics_box_collider: cc.PhysicsBoxCollider;
|
|
75
|
+
/**!#en Physics box collider !#zh 物理盒子碰撞器 */
|
|
76
|
+
box_collider_3d: cc.BoxCollider3D;
|
|
77
|
+
/**物理链碰撞组件 */
|
|
78
|
+
physics_chain_collider: cc.PhysicsChainCollider;
|
|
79
|
+
/**物理圆碰撞组件 */
|
|
80
|
+
physics_circle_collider: cc.PhysicsCircleCollider;
|
|
81
|
+
/**物理多边形碰撞组件 */
|
|
82
|
+
physics_polygon_collider: cc.PhysicsPolygonCollider;
|
|
83
|
+
/**!#en Physics sphere collider !#zh 物理球碰撞器 */
|
|
84
|
+
sphere_collider_3d: cc.SphereCollider3D;
|
|
85
|
+
/**!#en Each frame applies a constant force to a rigid body, depending on the RigidBody3D !#zh 在每帧对一个刚体施加持续的力,依赖 RigidBody3D 组件 */
|
|
86
|
+
constant_force: cc.ConstantForce;
|
|
87
|
+
/**!#en A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod. !#zh 距离关节通过一个固定的长度来约束关节链接的两个刚体。你可以将它想象成一个无质量,坚固的木棍。 */
|
|
88
|
+
distance_joint: cc.DistanceJoint;
|
|
89
|
+
/**!#en A motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground. !#zh 马达关节被用来控制两个刚体间的相对运动。 一个典型的例子是用来控制一个动态刚体相对于地面的运动。 */
|
|
90
|
+
motor_joint: cc.MotorJoint;
|
|
91
|
+
/**!#en A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. Mouse Joint will auto register the touch event with the mouse region node, and move the choosed rigidbody in touch move event. Note : generally mouse joint only used in test bed. !#zh 鼠标关节用于使刚体上的一个点追踪一个指定的世界坐标系下的位置。 鼠标关节可以指定一个最大的里来施加一个柔和的约束。 鼠标关节会自动使用 mouse region 节点来注册鼠标事件,并且在触摸移动事件中移动选中的刚体。 注意:一般鼠标关节只在测试环境中使用。 */
|
|
92
|
+
mouse_joint: cc.MouseJoint;
|
|
93
|
+
/**!#en A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in rigidbody. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction. !#zh 移动关节指定了只能在一个方向上移动刚体。 你可以开启关节限制来设置刚体运行移动的间距,也可以开启马达来使用关节马达驱动刚体的运行。 */
|
|
94
|
+
prismatic_joint: cc.PrismaticJoint;
|
|
95
|
+
/**!#en A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated. !#zh 旋转关节可以约束两个刚体围绕一个点来进行旋转。 你可以通过开启关节限制来限制旋转的最大角度和最小角度。 你可以通过开启马达来施加一个扭矩力来驱动这两个刚体在这一点上的相对速度。 */
|
|
96
|
+
revolute_joint: cc.RevoluteJoint;
|
|
97
|
+
/**!#en A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. !#zh 绳子关节只指定两个刚体间的最大距离,没有其他的效果。 注意:如果你试图动态修改关节的长度,这有可能会得到一些意外的效果。 */
|
|
98
|
+
rope_joint: cc.RopeJoint;
|
|
99
|
+
/**!#en A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate. !#zh 熔接关节相当于将两个刚体粘在了一起。 熔接关节可能会使某些东西失真,因为约束求解器算出的都是近似值。 */
|
|
100
|
+
weld_joint: cc.WeldJoint;
|
|
101
|
+
/**!#en A wheel joint. This joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane. You can use a joint motor to drive the rotation or to model rotational friction. This joint is designed for vehicle suspensions. !#zh 轮子关节提供两个维度的自由度:旋转和沿着指定方向上位置的移动。 你可以通过开启关节马达来使用马达驱动刚体的旋转。 轮组关节是专门为机动车类型设计的。 */
|
|
102
|
+
wheel_joint: cc.WheelJoint;
|
|
103
|
+
/**刚体 */
|
|
104
|
+
rigid_body: cc.RigidBody;
|
|
105
|
+
/**!#en Rigid body. !#zh 刚体组件。 */
|
|
106
|
+
rigid_body_3d: cc.RigidBody3D;
|
|
107
|
+
animation: cc.Animation;
|
|
108
|
+
/**!#en Audio Source. !#zh 音频源组件,能对音频剪辑。 */
|
|
109
|
+
audio_source: cc.AudioSource;
|
|
110
|
+
/**!#en Camera is usefull when making reel game or other games which need scroll screen. Using camera will be more efficient than moving node to scroll screen. Camera !#zh 摄像机在制作卷轴或是其他需要移动屏幕的游戏时比较有用,使用摄像机将会比移动节点来移动屏幕更加高效。 */
|
|
111
|
+
camera: cc.Camera;
|
|
112
|
+
/**!#en cc.MotionStreak manages a Ribbon based on it's motion in absolute space. You construct it with a fadeTime, minimum segment size, texture path, texture length and color. The fadeTime controls how long it takes each vertex in the streak to fade out, the minimum segment size it how many pixels the streak will move before adding a new ribbon segment, and the texture length is the how many pixels the texture is stretched across. The texture is vertically aligned along the streak segment. !#zh 运动轨迹,用于游戏对象的运动轨迹上实现拖尾渐隐效果。 */
|
|
113
|
+
motion_streak: cc.MotionStreak;
|
|
114
|
+
/**骨骼动画 */
|
|
115
|
+
skeleton_animation: cc.SkeletonAnimation;
|
|
116
|
+
/** !#en SwanSubContextView is a view component which controls open data context viewport in WeChat game platform*/
|
|
117
|
+
swan_sub_context_view: cc.SwanSubContextView;
|
|
118
|
+
/** !#en WXSubContextView is a view component which controls open data context viewport in WeChat game platform*/
|
|
119
|
+
wx_sub_context_view: cc.WXSubContextView;
|
|
120
|
+
}
|
|
121
|
+
}
|
package/CC.d.ts.meta
ADDED
package/FW.d.ts
CHANGED
|
@@ -281,7 +281,6 @@ declare namespace FW {
|
|
|
281
281
|
reconnectInternal: number;
|
|
282
282
|
protocolSymbol: Symbol;
|
|
283
283
|
protocolPollingTime: number;
|
|
284
|
-
certificate: cc.Asset;
|
|
285
284
|
};
|
|
286
285
|
|
|
287
286
|
/**
|
|
@@ -1491,7 +1490,7 @@ declare namespace FW {
|
|
|
1491
1490
|
/**
|
|
1492
1491
|
* 状态构造类
|
|
1493
1492
|
*/
|
|
1494
|
-
stateConstructor: { new(): T };
|
|
1493
|
+
stateConstructor: { new (): T };
|
|
1495
1494
|
};
|
|
1496
1495
|
|
|
1497
1496
|
type AudioManager = {
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
if (!CC_EDITOR) {
|
|
2
|
+
const component = {
|
|
3
|
+
dragon_bones: globalThis?.dragonBones?.ArmatureDisplay,
|
|
4
|
+
graphics: cc.Graphics,
|
|
5
|
+
label: cc.Label,
|
|
6
|
+
label_outline: cc.LabelOutline,
|
|
7
|
+
label_shadow: cc.LabelShadow,
|
|
8
|
+
light: cc.Light,
|
|
9
|
+
mask: cc.Mask,
|
|
10
|
+
particle_system: cc.ParticleSystem,
|
|
11
|
+
particle_system_3d: cc.ParticleSystem3D,
|
|
12
|
+
rich_text: cc.RichText,
|
|
13
|
+
sp_skeleton: globalThis?.sp?.Skeleton,
|
|
14
|
+
sprite: cc.Sprite,
|
|
15
|
+
tiled_map: cc.TiledMap,
|
|
16
|
+
tiled_tile: cc.TiledTile,
|
|
17
|
+
mesh_renderer: cc.MeshRenderer,
|
|
18
|
+
skinned_mesh_renderer: cc.SkinnedMeshRenderer,
|
|
19
|
+
block_input_events: cc.BlockInputEvents,
|
|
20
|
+
button: cc.Button,
|
|
21
|
+
canvas: cc.Canvas,
|
|
22
|
+
edit_box: cc.EditBox,
|
|
23
|
+
layout: cc.Layout,
|
|
24
|
+
page_view: cc.PageView,
|
|
25
|
+
page_view_indicator: cc.PageViewIndicator,
|
|
26
|
+
progress_bar: cc.ProgressBar,
|
|
27
|
+
scroll_bar: cc.Scrollbar,
|
|
28
|
+
scroll_view: cc.ScrollView,
|
|
29
|
+
slider: cc.Slider,
|
|
30
|
+
toggle: cc.Toggle,
|
|
31
|
+
toggle_container: cc.ToggleContainer,
|
|
32
|
+
video_player: cc.VideoPlayer,
|
|
33
|
+
web_view: cc.WebView,
|
|
34
|
+
widget: cc.Widget,
|
|
35
|
+
box_collider: cc.BoxCollider,
|
|
36
|
+
circle_collider: cc.CircleCollider,
|
|
37
|
+
polygon_collider: cc.PolygonCollider,
|
|
38
|
+
physics_box_collider: cc.PhysicsBoxCollider,
|
|
39
|
+
box_collider_3d: cc.BoxCollider3D,
|
|
40
|
+
physics_chain_collider: cc.PhysicsChainCollider,
|
|
41
|
+
physics_circle_collider: cc.PhysicsCircleCollider,
|
|
42
|
+
physics_polygon_collider: cc.PhysicsPolygonCollider,
|
|
43
|
+
sphere_collider_3d: cc.SphereCollider3D,
|
|
44
|
+
constant_force: cc.ConstantForce,
|
|
45
|
+
distance_joint: cc.DistanceJoint,
|
|
46
|
+
motor_joint: cc.MotorJoint,
|
|
47
|
+
mouse_joint: cc.MouseJoint,
|
|
48
|
+
prismatic_joint: cc.PrismaticJoint,
|
|
49
|
+
revolute_joint: cc.RevoluteJoint,
|
|
50
|
+
rope_joint: cc.RopeJoint,
|
|
51
|
+
weld_joint: cc.WeldJoint,
|
|
52
|
+
wheel_joint: cc.WheelJoint,
|
|
53
|
+
rigid_body: cc.RigidBody,
|
|
54
|
+
rigid_body_3d: cc.RigidBody3D,
|
|
55
|
+
animation: cc.Animation,
|
|
56
|
+
audio_source: cc.AudioSource,
|
|
57
|
+
camera: cc.Camera,
|
|
58
|
+
motion_streak: cc.MotionStreak,
|
|
59
|
+
skeleton_animation: cc.SkeletonAnimation,
|
|
60
|
+
swan_sub_context_view: cc.SwanSubContextView,
|
|
61
|
+
wx_sub_context_view: cc.WXSubContextView,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Object.defineProperty(cc.Node.prototype, 'node_prototype', {
|
|
65
|
+
get: function () {
|
|
66
|
+
if (!this.node_cache) {
|
|
67
|
+
this.node_cache = {
|
|
68
|
+
component_map: new Map<string, cc.Component>(),
|
|
69
|
+
child_map: new Map<string, cc.Node>(),
|
|
70
|
+
child_update: false,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return this.node_cache;
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
Object.defineProperty(cc.Node.prototype, 'child_update', {
|
|
78
|
+
get: function () {
|
|
79
|
+
return this.node_prototype.child_update;
|
|
80
|
+
},
|
|
81
|
+
set: function () {
|
|
82
|
+
const target = this;
|
|
83
|
+
if (this.node_prototype.child_update) {
|
|
84
|
+
this.node_prototype.child_update = false;
|
|
85
|
+
this.off(
|
|
86
|
+
cc.Node.EventType.CHILD_REMOVED,
|
|
87
|
+
function (node: cc.Node) {
|
|
88
|
+
return target.node_prototype.child_map.delete(node.name);
|
|
89
|
+
},
|
|
90
|
+
this,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
this.on(
|
|
94
|
+
cc.Node.EventType.CHILD_REMOVED,
|
|
95
|
+
function (node: cc.Node) {
|
|
96
|
+
return target.node_prototype.child_map.delete(node.name);
|
|
97
|
+
},
|
|
98
|
+
this,
|
|
99
|
+
);
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const find = function (k) {
|
|
104
|
+
Object.defineProperty(cc.Node.prototype, k, {
|
|
105
|
+
get: function () {
|
|
106
|
+
let c = this.node_prototype.component_map.get(k);
|
|
107
|
+
if (!c) {
|
|
108
|
+
c = this.getComponent(component[k]);
|
|
109
|
+
this.node_prototype.component_map.set(k, c);
|
|
110
|
+
}
|
|
111
|
+
return c;
|
|
112
|
+
},
|
|
113
|
+
set: function () {
|
|
114
|
+
this.node_prototype.component_map.delete(k);
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
for (const k in component) {
|
|
120
|
+
find(k);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
cc.Node.prototype.child = function (path: string, autoUpdate: boolean) {
|
|
124
|
+
const path_ss = path.split('/');
|
|
125
|
+
let self = this;
|
|
126
|
+
let t: cc.Node;
|
|
127
|
+
for (let _i = 0, path_ss_1 = path_ss; _i < path_ss_1.length; _i++) {
|
|
128
|
+
const path_s = path_ss_1[_i];
|
|
129
|
+
if (autoUpdate) {
|
|
130
|
+
self.node_prototype.child_map.delete(path_s);
|
|
131
|
+
t = self.getChildByName(path_s);
|
|
132
|
+
self.node_prototype.child_map.set(path_s, t);
|
|
133
|
+
} else {
|
|
134
|
+
t = self.node_prototype.child_map.get(path_s);
|
|
135
|
+
if (!t) {
|
|
136
|
+
t = self.getChildByName(path_s);
|
|
137
|
+
self.node_prototype.child_map.set(path_s, t);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (!t) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
self = t;
|
|
144
|
+
}
|
|
145
|
+
return t;
|
|
146
|
+
};
|
|
147
|
+
}
|