跳至主要內容

Class: layer

muzzik大约 1 分钟

index / layer

Class: layer

层级管理

Remarks

  • 动态多类型层级划分

  • 支持类型层级细粒度划分

Hierarchy

Table of contents

Properties

Accessors

Methods

Properties

config

Static config: global_config

Defined in

assets/@framework/module/mk_layer.ts:39open in new window


layer_type_n

layer_type_n: number = 0

层类型

Defined in

assets/@framework/module/mk_layer.ts:64open in new window


_use_layer_b

Protected _use_layer_b: boolean = true

使用 layer

Default Value

true

Remarks

false:关闭 layer 功能

Defined in

assets/@framework/module/mk_layer.ts:94open in new window

Accessors

init_editor

get init_editor(): void

初始化编辑器

Returns

void

Defined in

assets/@framework/module/mk_layer.ts:49open in new window


child_layer_n

get child_layer_n(): number

层级

Returns

number

Defined in

assets/@framework/module/mk_layer.ts:77open in new window

set child_layer_n(value_n_): void

Parameters

NameType
value_n_number

Returns

void

Defined in

assets/@framework/module/mk_layer.ts:81open in new window

Methods

set_layer_refresh_interval

Static set_layer_refresh_interval(node_, interval_ms_n_, recursion_b_?): void

设置层级刷新间隔

Parameters

NameTypeDefault valueDescription
node_Nodeundefined节点
interval_ms_n_numberundefined间隔时间(毫秒)
recursion_b_booleanfalse递归

Returns

void

Remarks

设置 node_ 的子节点将延迟 interval_ms_n_ 时间后更新层级

Defined in

assets/@framework/module/mk_layer.ts:109open in new window


onLoad

Protected onLoad(): void

Returns

void

Overrides

cc.Component.onLoad

Defined in

assets/@framework/module/mk_layer.ts:126open in new window


_init_editor

Protected _init_editor(): void

初始化编辑器

Returns

void

Defined in

assets/@framework/module/mk_layer.ts:136open in new window

📣 觉得很赞?分享给你的朋友吧!