Constructor
new NodeControllers(packedData)
创建一个节点控制器
Parameters:
| Name | Type | Description |
|---|---|---|
packedData | PackedNode | | 服务端传过来的打包的数据,要求 |
- Source
Members
id :number
节点id
Type:
- number
- Source
_uiNode :UiBox|UiInput|UiText|UiImage|null
对应节点
Type:
- UiBox |
UiInput | UiText | UiImage | null
- Source
parent :NodeControllers
父节点控制器
Type:
- NodeControllers
- Source
id :number
节点id
Type:
- number
- Source
_uiNode :UiBox|UiInput|UiText|UiImage|null
对应节点
Type:
- UiBox |
UiInput | UiText | UiImage | null
- Source
parent :NodeControllers
父节点控制器
Type:
- NodeControllers
- Source
Methods
render(packedData)
渲染节点
Parameters:
| Name | Type | Description |
|---|---|---|
packedData | PackedNode | 服务端传过来的打包的数据,要求 |
- Source
reload(packedData)
完全重新渲染节点
节点会被移除并被重新创建
其子节点不会被移除,而是移动到新节点中
可以通过此方法完成不同类型节点的转换
Parameters:
| Name | Type | Description |
|---|---|---|
packedData | PackedNode | 服务端传过来的打包的节点,要求 |
- Source
_pack() → {PackedNode}
打包节点,供事件使用
- Source
Returns:
- Type:
- PackedNode
render(packedData)
渲染节点
Parameters:
| Name | Type | Description |
|---|---|---|
packedData | PackedNode | 服务端传过来的打包的数据,要求 |
- Source
reload(packedData)
完全重新渲染节点
节点会被移除并被重新创建
其子节点不会被移除,而是移动到新节点中
可以通过此方法完成不同类型节点的转换
Parameters:
| Name | Type | Description |
|---|---|---|
packedData | PackedNode | 服务端传过来的打包的节点,要求 |
- Source
_pack() → {PackedNode}
打包节点,供事件使用
- Source
Returns:
- Type:
- PackedNode