From 8bcbc8179b0743b3483f315a2f42e14d02a32a3c Mon Sep 17 00:00:00 2001
From: dgflash 该组件被附加到的节点。组件总会附加到一个节点。Zh
Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
since v3.5.0, this is an engine private interface that will be removed in the future.
-// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -778,7 +778,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -806,7 +806,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -841,7 +841,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -871,7 +871,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -895,7 +895,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -923,7 +923,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -947,7 +947,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -975,7 +975,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -999,7 +999,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -1027,7 +1027,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1055,7 +1055,7 @@ Currently it is only available in Native platform and Web Audio (including Web a
Returns
A Promise to get the PCM data after audio is loaded.
-Example
audioSource.getPCMData(0).then(dataView => {
if (!dataView) return;
for (let i = 0; i < dataView.length; ++i) {
console.log('data: ' + dataView.getData(i));
}
});
+Example
audioSource.getPCMData(0).then(dataView => {
if (!dataView) return;
for (let i = 0; i < dataView.length; ++i) {
console.log('data: ' + dataView.getData(i));
}
});
@@ -1339,7 +1339,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1379,7 +1379,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1439,7 +1439,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1463,7 +1463,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/AudioManager.html b/docs/classes/AudioManager.html
index 0f318fe..12f30fc 100644
--- a/docs/classes/AudioManager.html
+++ b/docs/classes/AudioManager.html
@@ -16,7 +16,7 @@
@@ -227,7 +227,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -275,7 +275,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -296,7 +296,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -325,7 +325,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -377,7 +377,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -507,7 +507,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -620,7 +620,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -701,7 +701,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -729,7 +729,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -764,7 +764,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -794,7 +794,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -818,7 +818,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -846,7 +846,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -870,7 +870,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -898,7 +898,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -922,7 +922,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -950,7 +950,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1227,7 +1227,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1267,7 +1267,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1340,7 +1340,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1364,7 +1364,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/AudioMusic.html b/docs/classes/AudioMusic.html
index 572bb2b..c7cb0c2 100644
--- a/docs/classes/AudioMusic.html
+++ b/docs/classes/AudioMusic.html
@@ -242,7 +242,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from AudioSource.node
@@ -304,7 +304,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -396,7 +396,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -425,7 +425,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -477,7 +477,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -642,7 +642,7 @@ after a user gesture is received, according to the latest autoplay policy:
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -733,7 +733,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -823,7 +823,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -851,7 +851,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -886,7 +886,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -916,7 +916,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -940,7 +940,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -968,7 +968,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -992,7 +992,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -1020,7 +1020,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -1044,7 +1044,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -1072,7 +1072,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1100,7 +1100,7 @@ Currently it is only available in Native platform and Web Audio (including Web a
Returns
A Promise to get the PCM data after audio is loaded.
-Example
audioSource.getPCMData(0).then(dataView => {
if (!dataView) return;
for (let i = 0; i < dataView.length; ++i) {
console.log('data: ' + dataView.getData(i));
}
});
+Example
audioSource.getPCMData(0).then(dataView => {
if (!dataView) return;
for (let i = 0; i < dataView.length; ++i) {
console.log('data: ' + dataView.getData(i));
}
});
@@ -1384,7 +1384,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1424,7 +1424,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1484,7 +1484,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1508,7 +1508,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/CommonPrompt.html b/docs/classes/CommonPrompt.html
index 6200199..1b3131b 100644
--- a/docs/classes/CommonPrompt.html
+++ b/docs/classes/CommonPrompt.html
@@ -215,7 +215,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -258,7 +258,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -279,7 +279,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -308,7 +308,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -360,7 +360,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -418,7 +418,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -473,7 +473,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -554,7 +554,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -582,7 +582,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -625,7 +625,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -655,7 +655,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -679,7 +679,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -707,7 +707,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -731,7 +731,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -759,7 +759,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -783,7 +783,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -811,7 +811,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1065,7 +1065,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1105,7 +1105,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1183,7 +1183,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1207,7 +1207,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/DelegateComponent.html b/docs/classes/DelegateComponent.html
index f372489..96c8f39 100644
--- a/docs/classes/DelegateComponent.html
+++ b/docs/classes/DelegateComponent.html
@@ -172,7 +172,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -222,7 +222,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -243,7 +243,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -272,7 +272,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -324,7 +324,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -382,7 +382,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -437,7 +437,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -528,7 +528,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -556,7 +556,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -608,7 +608,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -638,7 +638,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -662,7 +662,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -690,7 +690,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -714,7 +714,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -742,7 +742,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -766,7 +766,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -794,7 +794,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1017,7 +1017,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1057,7 +1057,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1103,7 +1103,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1127,7 +1127,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/GUI.html b/docs/classes/GUI.html
index 2778149..d36550e 100644
--- a/docs/classes/GUI.html
+++ b/docs/classes/GUI.html
@@ -188,7 +188,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -252,7 +252,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -273,7 +273,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -302,7 +302,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -354,7 +354,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -412,7 +412,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -467,7 +467,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -548,7 +548,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -576,7 +576,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -611,7 +611,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -641,7 +641,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -665,7 +665,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -693,7 +693,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -717,7 +717,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -745,7 +745,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -769,7 +769,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -797,7 +797,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1007,7 +1007,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1047,7 +1047,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1093,7 +1093,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1117,7 +1117,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/GameCollision.html b/docs/classes/GameCollision.html
index 678334e..228edd3 100644
--- a/docs/classes/GameCollision.html
+++ b/docs/classes/GameCollision.html
@@ -218,7 +218,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -266,7 +266,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -287,7 +287,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -316,7 +316,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -368,7 +368,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -426,7 +426,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -481,7 +481,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -562,7 +562,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -590,7 +590,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -625,7 +625,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -655,7 +655,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -679,7 +679,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -707,7 +707,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -731,7 +731,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -759,7 +759,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -783,7 +783,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -811,7 +811,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1105,7 +1105,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1145,7 +1145,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1191,7 +1191,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1215,7 +1215,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/GameComponent.html b/docs/classes/GameComponent.html
index 34b13f4..ba41547 100644
--- a/docs/classes/GameComponent.html
+++ b/docs/classes/GameComponent.html
@@ -197,7 +197,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -247,7 +247,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -268,7 +268,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -297,7 +297,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -357,7 +357,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -415,7 +415,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -470,7 +470,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -581,7 +581,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -609,7 +609,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -690,7 +690,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -720,7 +720,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -744,7 +744,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -772,7 +772,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -796,7 +796,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -824,7 +824,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -848,7 +848,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -876,7 +876,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1100,7 +1100,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1140,7 +1140,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1196,7 +1196,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1220,7 +1220,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/ImageUtil.html b/docs/classes/ImageUtil.html
index e3364b1..9635830 100644
--- a/docs/classes/ImageUtil.html
+++ b/docs/classes/ImageUtil.html
@@ -89,7 +89,7 @@
获取纹理中指定像素的颜色,原点为左上角,从像素 (1, 1) 开始。
-Example
// 获取纹理左上角第一个像素的颜色
const color = ImageUtil.getPixelColor(texture, 1, 1);
cc.color(50, 100, 123, 255);
+Example
// 获取纹理左上角第一个像素的颜色
const color = ImageUtil.getPixelColor(texture, 1, 1);
cc.color(50, 100, 123, 255);
diff --git a/docs/classes/LayerDialog.html b/docs/classes/LayerDialog.html
index c7adc52..9882cb5 100644
--- a/docs/classes/LayerDialog.html
+++ b/docs/classes/LayerDialog.html
@@ -793,7 +793,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -1220,7 +1220,7 @@ but this is often caused by a particular logical requirements, which is not norm
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -1469,7 +1469,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the classConstructor does not specify a cc-class constructor extending the Component.
-Example
var sprite = node.addComponent(Sprite);
+Example
var sprite = node.addComponent(Sprite);
@@ -1499,7 +1499,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the className does not specify a cc-class constructor extending the Component.
-Example
var test = node.addComponent("Test");
+Example
var test = node.addComponent("Test");
@@ -1526,7 +1526,7 @@ the property will be set via setter function.
Zh
属性配置函数。在 attrs 的所有属性将被设置为节点属性。
-Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
+Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
@@ -1633,7 +1633,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Zh
通过事件名发送自定义事件
-Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
+Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
@@ -1729,7 +1729,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a CCNode object whose name equals to the input parameter
-Example
var child = node.getChildByName("Test Node");
+Example
var child = node.getChildByName("Test Node");
@@ -1755,7 +1755,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a Node object whose path equals to the input parameter
-Example
var child = node.getChildByPath("subNode/Test Node");
+Example
var child = node.getChildByPath("subNode/Test Node");
@@ -1804,7 +1804,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -1834,7 +1834,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test class.
var test = node.getComponent("Test");
+Example
// get custom test class.
var test = node.getComponent("Test");
@@ -1858,7 +1858,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var sprite = node.getComponentInChildren(Sprite);
+Example
var sprite = node.getComponentInChildren(Sprite);
@@ -1886,7 +1886,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -1956,7 +1956,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var sprites = node.getComponentsInChildren(Sprite);
+Example
var sprites = node.getComponentsInChildren(Sprite);
@@ -1984,7 +1984,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var tests = node.getComponentsInChildren("Test");
+Example
var tests = node.getComponentsInChildren("Test");
@@ -2322,7 +2322,7 @@ You can also get component in the node by passing in the name of the script.
Zh
插入子节点到指定位置
-Example
node.insertChild(child, 2);
+Example
node.insertChild(child, 2);
@@ -2474,7 +2474,7 @@ This method is merely an alias to removeEventListener.
Zh
删除之前与同类型,回调,目标或 useCapture 注册的回调。
-Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
+Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
@@ -2534,7 +2534,7 @@ You can also pass event callback parameters with emit by passing pa
Just returns the incoming callback so you can save the anonymous function easier.
-Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
+Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
@@ -2707,7 +2707,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
node.removeComponent(Sprite);
+Example
node.removeComponent(Sprite);
@@ -2739,7 +2739,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
+Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
@@ -3353,7 +3353,7 @@ Please don't walk any other node inside the walk process.
这个函数的实现不是基于递归的,而是基于栈展开递归的方式。
请不要在 walk 过程中对任何其他的节点嵌套执行 walk。
-Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
+Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
diff --git a/docs/classes/LayerManager.html b/docs/classes/LayerManager.html
index 86b718f..314a14e 100644
--- a/docs/classes/LayerManager.html
+++ b/docs/classes/LayerManager.html
@@ -184,7 +184,7 @@
清除所有窗口
-Example
oops.gui.clear();
+Example
oops.gui.clear();
@@ -217,7 +217,7 @@
缓存中是否存在指定标识的窗口
-Example
oops.gui.has(UIID.Loading);
+Example
oops.gui.has(UIID.Loading);
@@ -257,7 +257,7 @@
同步打开一个窗口
-Example
var uic: UICallbacks = {
onAdded: (node: Node, params: any) => {
var comp = node.getComponent(LoadingViewComp) as ecs.Comp;
}
onRemoved:(node: Node | null, params: any) => {
}
};
oops.gui.open(UIID.Loading, null, uic);
+Example
var uic: UICallbacks = {
onAdded: (node: Node, params: any) => {
var comp = node.getComponent(LoadingViewComp) as ecs.Comp;
}
onRemoved:(node: Node | null, params: any) => {
}
};
oops.gui.open(UIID.Loading, null, uic);
@@ -285,7 +285,7 @@
异步打开一个窗口
-Example
var node = await oops.gui.openAsync(UIID.Loading);
+Example
var node = await oops.gui.openAsync(UIID.Loading);
@@ -309,7 +309,7 @@
移除指定标识的窗口
-Example
oops.gui.remove(UIID.Loading);
+Example
oops.gui.remove(UIID.Loading);
@@ -333,7 +333,7 @@
删除一个通过this框架添加进来的节点
-Example
oops.gui.removeByNode(cc.Node);
+Example
oops.gui.removeByNode(cc.Node);
@@ -395,7 +395,7 @@
渐隐飘过提示
-Example
oops.gui.toast("提示内容");
+Example
oops.gui.toast("提示内容");
diff --git a/docs/classes/LayerNotify.html b/docs/classes/LayerNotify.html
index b5c3603..7942d9c 100644
--- a/docs/classes/LayerNotify.html
+++ b/docs/classes/LayerNotify.html
@@ -777,7 +777,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -1204,7 +1204,7 @@ but this is often caused by a particular logical requirements, which is not norm
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -1453,7 +1453,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the classConstructor does not specify a cc-class constructor extending the Component.
-Example
var sprite = node.addComponent(Sprite);
+Example
var sprite = node.addComponent(Sprite);
@@ -1483,7 +1483,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the className does not specify a cc-class constructor extending the Component.
-Example
var test = node.addComponent("Test");
+Example
var test = node.addComponent("Test");
@@ -1510,7 +1510,7 @@ the property will be set via setter function.
Zh
属性配置函数。在 attrs 的所有属性将被设置为节点属性。
-Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
+Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
@@ -1617,7 +1617,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Zh
通过事件名发送自定义事件
-Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
+Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
@@ -1713,7 +1713,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a CCNode object whose name equals to the input parameter
-Example
var child = node.getChildByName("Test Node");
+Example
var child = node.getChildByName("Test Node");
@@ -1739,7 +1739,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a Node object whose path equals to the input parameter
-Example
var child = node.getChildByPath("subNode/Test Node");
+Example
var child = node.getChildByPath("subNode/Test Node");
@@ -1788,7 +1788,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -1818,7 +1818,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test class.
var test = node.getComponent("Test");
+Example
// get custom test class.
var test = node.getComponent("Test");
@@ -1842,7 +1842,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var sprite = node.getComponentInChildren(Sprite);
+Example
var sprite = node.getComponentInChildren(Sprite);
@@ -1870,7 +1870,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -1940,7 +1940,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var sprites = node.getComponentsInChildren(Sprite);
+Example
var sprites = node.getComponentsInChildren(Sprite);
@@ -1968,7 +1968,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var tests = node.getComponentsInChildren("Test");
+Example
var tests = node.getComponentsInChildren("Test");
@@ -2306,7 +2306,7 @@ You can also get component in the node by passing in the name of the script.
Zh
插入子节点到指定位置
-Example
node.insertChild(child, 2);
+Example
node.insertChild(child, 2);
@@ -2446,7 +2446,7 @@ This method is merely an alias to removeEventListener.
Zh
删除之前与同类型,回调,目标或 useCapture 注册的回调。
-Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
+Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
@@ -2506,7 +2506,7 @@ You can also pass event callback parameters with emit by passing pa
Just returns the incoming callback so you can save the anonymous function easier.
-Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
+Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
@@ -2679,7 +2679,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
node.removeComponent(Sprite);
+Example
node.removeComponent(Sprite);
@@ -2711,7 +2711,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
+Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
@@ -3337,7 +3337,7 @@ Please don't walk any other node inside the walk process.
这个函数的实现不是基于递归的,而是基于栈展开递归的方式。
请不要在 walk 过程中对任何其他的节点嵌套执行 walk。
-Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
+Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
diff --git a/docs/classes/LayerPopUp.html b/docs/classes/LayerPopUp.html
index 05c9466..402af7e 100644
--- a/docs/classes/LayerPopUp.html
+++ b/docs/classes/LayerPopUp.html
@@ -784,7 +784,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -1211,7 +1211,7 @@ but this is often caused by a particular logical requirements, which is not norm
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -1460,7 +1460,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the classConstructor does not specify a cc-class constructor extending the Component.
-Example
var sprite = node.addComponent(Sprite);
+Example
var sprite = node.addComponent(Sprite);
@@ -1490,7 +1490,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the className does not specify a cc-class constructor extending the Component.
-Example
var test = node.addComponent("Test");
+Example
var test = node.addComponent("Test");
@@ -1517,7 +1517,7 @@ the property will be set via setter function.
Zh
属性配置函数。在 attrs 的所有属性将被设置为节点属性。
-Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
+Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
@@ -1624,7 +1624,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Zh
通过事件名发送自定义事件
-Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
+Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
@@ -1720,7 +1720,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a CCNode object whose name equals to the input parameter
-Example
var child = node.getChildByName("Test Node");
+Example
var child = node.getChildByName("Test Node");
@@ -1746,7 +1746,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a Node object whose path equals to the input parameter
-Example
var child = node.getChildByPath("subNode/Test Node");
+Example
var child = node.getChildByPath("subNode/Test Node");
@@ -1795,7 +1795,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -1825,7 +1825,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test class.
var test = node.getComponent("Test");
+Example
// get custom test class.
var test = node.getComponent("Test");
@@ -1849,7 +1849,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var sprite = node.getComponentInChildren(Sprite);
+Example
var sprite = node.getComponentInChildren(Sprite);
@@ -1877,7 +1877,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -1947,7 +1947,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var sprites = node.getComponentsInChildren(Sprite);
+Example
var sprites = node.getComponentsInChildren(Sprite);
@@ -1975,7 +1975,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var tests = node.getComponentsInChildren("Test");
+Example
var tests = node.getComponentsInChildren("Test");
@@ -2321,7 +2321,7 @@ You can also get component in the node by passing in the name of the script.
Zh
插入子节点到指定位置
-Example
node.insertChild(child, 2);
+Example
node.insertChild(child, 2);
@@ -2465,7 +2465,7 @@ This method is merely an alias to removeEventListener.
Zh
删除之前与同类型,回调,目标或 useCapture 注册的回调。
-Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
+Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
@@ -2525,7 +2525,7 @@ You can also pass event callback parameters with emit by passing pa
Just returns the incoming callback so you can save the anonymous function easier.
-Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
+Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
@@ -2698,7 +2698,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
node.removeComponent(Sprite);
+Example
node.removeComponent(Sprite);
@@ -2730,7 +2730,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
+Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
@@ -3343,7 +3343,7 @@ Please don't walk any other node inside the walk process.
这个函数的实现不是基于递归的,而是基于栈展开递归的方式。
请不要在 walk 过程中对任何其他的节点嵌套执行 walk。
-Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
+Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
diff --git a/docs/classes/LayerUI.html b/docs/classes/LayerUI.html
index a55b66a..a540511 100644
--- a/docs/classes/LayerUI.html
+++ b/docs/classes/LayerUI.html
@@ -780,7 +780,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -1206,7 +1206,7 @@ but this is often caused by a particular logical requirements, which is not norm
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -1454,7 +1454,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the classConstructor does not specify a cc-class constructor extending the Component.
-Example
var sprite = node.addComponent(Sprite);
+Example
var sprite = node.addComponent(Sprite);
@@ -1484,7 +1484,7 @@ The derived Scene overrides this method to behavior differently.ThrowsTypeError if the className does not specify a cc-class constructor extending the Component.
-Example
var test = node.addComponent("Test");
+Example
var test = node.addComponent("Test");
@@ -1511,7 +1511,7 @@ the property will be set via setter function.
Zh
属性配置函数。在 attrs 的所有属性将被设置为节点属性。
-Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
+Example
var attrs = { name: 'New Name', active: false };
node.attr(attrs);
@@ -1616,7 +1616,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Zh
通过事件名发送自定义事件
-Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
+Example
eventTarget.emit('fire', event);
eventTarget.emit('fire', message, emitter);
@@ -1709,7 +1709,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a CCNode object whose name equals to the input parameter
-Example
var child = node.getChildByName("Test Node");
+Example
var child = node.getChildByName("Test Node");
@@ -1735,7 +1735,7 @@ The event target is the EventTarget object upon which the dispatchEvent() method
Returns
a Node object whose path equals to the input parameter
-Example
var child = node.getChildByPath("subNode/Test Node");
+Example
var child = node.getChildByPath("subNode/Test Node");
@@ -1784,7 +1784,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -1814,7 +1814,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test class.
var test = node.getComponent("Test");
+Example
// get custom test class.
var test = node.getComponent("Test");
@@ -1838,7 +1838,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var sprite = node.getComponentInChildren(Sprite);
+Example
var sprite = node.getComponentInChildren(Sprite);
@@ -1866,7 +1866,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -1936,7 +1936,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var sprites = node.getComponentsInChildren(Sprite);
+Example
var sprites = node.getComponentsInChildren(Sprite);
@@ -1964,7 +1964,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件
-Example
var tests = node.getComponentsInChildren("Test");
+Example
var tests = node.getComponentsInChildren("Test");
@@ -2300,7 +2300,7 @@ You can also get component in the node by passing in the name of the script.
Zh
插入子节点到指定位置
-Example
node.insertChild(child, 2);
+Example
node.insertChild(child, 2);
@@ -2443,7 +2443,7 @@ This method is merely an alias to removeEventListener.
Zh
删除之前与同类型,回调,目标或 useCapture 注册的回调。
-Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
+Example
this.node.off(NodeEventType.TOUCH_START, this.memberFunction, this);
node.off(NodeEventType.TOUCH_START, callback, this.node);
@@ -2503,7 +2503,7 @@ You can also pass event callback parameters with emit by passing pa
Just returns the incoming callback so you can save the anonymous function easier.
-Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
+Example
this.node.on(NodeEventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
node.on(NodeEventType.TOUCH_START, callback, this);
node.on(NodeEventType.TOUCH_MOVE, callback, this);
node.on(NodeEventType.TOUCH_END, callback, this);
@@ -2689,7 +2689,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
node.removeComponent(Sprite);
+Example
node.removeComponent(Sprite);
@@ -2721,7 +2721,7 @@ You can also use component.destroy() if you already have the reference.
Deprecated
please destroy the component to remove it.
-Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
+Example
import { Sprite } from 'cc';
const sprite = node.getComponent(Sprite);
if (sprite) {
node.removeComponent(sprite);
}
node.removeComponent('Sprite');
@@ -3325,7 +3325,7 @@ Please don't walk any other node inside the walk process.
这个函数的实现不是基于递归的,而是基于栈展开递归的方式。
请不要在 walk 过程中对任何其他的节点嵌套执行 walk。
-Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
+Example
node.walk(function (target) {
console.log('Walked through node ' + target.name + ' for the first time');
}, function (target) {
console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');
});
diff --git a/docs/classes/LoadingIndicator.html b/docs/classes/LoadingIndicator.html
index 8795fc8..ef82a93 100644
--- a/docs/classes/LoadingIndicator.html
+++ b/docs/classes/LoadingIndicator.html
@@ -179,7 +179,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -222,7 +222,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -243,7 +243,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -272,7 +272,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -324,7 +324,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -382,7 +382,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -437,7 +437,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -518,7 +518,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -546,7 +546,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -581,7 +581,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -611,7 +611,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -635,7 +635,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -663,7 +663,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -687,7 +687,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -715,7 +715,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -739,7 +739,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -767,7 +767,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -966,7 +966,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1006,7 +1006,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1052,7 +1052,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1076,7 +1076,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/Logger.html b/docs/classes/Logger.html
index 469a138..3e5c1af 100644
--- a/docs/classes/Logger.html
+++ b/docs/classes/Logger.html
@@ -16,7 +16,7 @@
日志管理
-Example
oops.log.trace("默认标准日志");
oops.log.logConfig("灰色配置日志");
oops.log.logNet("橙色网络日志");
oops.log.logModel("紫色数据日志");
oops.log.logBusiness("蓝色业务日志");
oops.log.logView("绿色视图日志");
+Example
oops.log.trace("默认标准日志");
oops.log.logConfig("灰色配置日志");
oops.log.logNet("橙色网络日志");
oops.log.logModel("紫色数据日志");
oops.log.logBusiness("蓝色业务日志");
oops.log.logView("绿色视图日志");
@@ -102,7 +102,7 @@
打印范围内时间消耗
-Example
oops.log.start();
...
省略N行代码
...
oops.log.end();
+Example
oops.log.start();
...
省略N行代码
...
oops.log.end();
@@ -332,7 +332,7 @@
设置显示的日志类型,默认值为不显示任何类型日志
-Example
oops.log.setTags(LogType.View|LogType.Business)
+Example
oops.log.setTags(LogType.View|LogType.Business)
@@ -363,7 +363,7 @@
记录开始计时
-Example
oops.log.start();
...
省略N行代码
...
oops.log.end();
+Example
oops.log.start();
...
省略N行代码
...
oops.log.end();
@@ -383,7 +383,7 @@
打印表格
-Example
var object:any = {uid:1000, name:"oops"};
oops.log.table(object);
+Example
var object:any = {uid:1000, name:"oops"};
oops.log.table(object);
diff --git a/docs/classes/MessageManager.html b/docs/classes/MessageManager.html
index d1e9910..d0439fd 100644
--- a/docs/classes/MessageManager.html
+++ b/docs/classes/MessageManager.html
@@ -16,7 +16,7 @@
全局消息管理
-Example
// 注册持续监听的全局事件
export class RoleViewComp extends Component{
onLoad(){
// 监听全局事件
oops.message.on(GameEvent.GameServerConnected, this.onHandler, this);
}
protected onDestroy() {
// 对象释放时取消注册的全局事件
oops.message.off(GameEvent.GameServerConnected, this.onHandler, this);
}
private onHandler(event: string, args: any) {
switch (event) {
case GameEvent.GameServerConnected:
console.log("处理游戏服务器连接成功后的逻辑");
break;
}
}
}
// 注册只触发一次的全局事件
export class RoleViewComp extends Component{
onLoad(){
// 监听一次事件,事件响应后,该监听自动移除
oops.message.once(GameEvent.GameServerConnected, this.onHandler, this);
}
private onHandler(event: string, args: any) {
switch (event) {
case GameEvent.GameServerConnected:
console.log("处理游戏服务器连接成功后的逻辑");
break;
}
}
}
+Example
// 注册持续监听的全局事件
export class RoleViewComp extends Component{
onLoad(){
// 监听全局事件
oops.message.on(GameEvent.GameServerConnected, this.onHandler, this);
}
protected onDestroy() {
// 对象释放时取消注册的全局事件
oops.message.off(GameEvent.GameServerConnected, this.onHandler, this);
}
private onHandler(event: string, args: any) {
switch (event) {
case GameEvent.GameServerConnected:
console.log("处理游戏服务器连接成功后的逻辑");
break;
}
}
}
// 注册只触发一次的全局事件
export class RoleViewComp extends Component{
onLoad(){
// 监听一次事件,事件响应后,该监听自动移除
oops.message.once(GameEvent.GameServerConnected, this.onHandler, this);
}
private onHandler(event: string, args: any) {
switch (event) {
case GameEvent.GameServerConnected:
console.log("处理游戏服务器连接成功后的逻辑");
break;
}
}
}
diff --git a/docs/classes/Notify.html b/docs/classes/Notify.html
index a60d796..86f7312 100644
--- a/docs/classes/Notify.html
+++ b/docs/classes/Notify.html
@@ -181,7 +181,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -224,7 +224,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -245,7 +245,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -274,7 +274,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -326,7 +326,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -384,7 +384,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -439,7 +439,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -520,7 +520,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -548,7 +548,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -583,7 +583,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -613,7 +613,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -637,7 +637,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -665,7 +665,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -689,7 +689,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -717,7 +717,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -741,7 +741,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -769,7 +769,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -967,7 +967,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1007,7 +1007,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1074,7 +1074,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1098,7 +1098,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/RandomManager.html b/docs/classes/RandomManager.html
index 22589d7..73720e6 100644
--- a/docs/classes/RandomManager.html
+++ b/docs/classes/RandomManager.html
@@ -98,7 +98,7 @@
根据最大值,最小值范围生成随机数数组
-Example
var a = RandomManager.instance.getRandomByMinMaxList(50, 100, 5)
console.log("随机的数字", a);
+Example
var a = RandomManager.instance.getRandomByMinMaxList(50, 100, 5)
console.log("随机的数字", a);
@@ -126,7 +126,7 @@
获取数组中随机对象
-Example
var b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var r = RandomManager.instance.getRandomByObjectList(b, 5);
console.log("原始的对象", b);
console.log("随机的对象", r);
+Example
var b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var r = RandomManager.instance.getRandomByObjectList(b, 5);
console.log("原始的对象", b);
console.log("随机的对象", r);
@@ -157,7 +157,7 @@
定和随机分配
-Example
var c = RandomManager.instance.getRandomBySumList(5, -100,);
console.log("定和随机分配", c);
+Example
var c = RandomManager.instance.getRandomBySumList(5, -100,);
console.log("定和随机分配", c);
@@ -181,7 +181,7 @@
生成指定范围的随机整数
-Example
var min = 1;
var max = 10;
// [min,max) 得到一个两数之间的随机整数,这个值不小于min(如果min不是整数的话,得到一个向上取整的 min),并且小于(但不等于)max
RandomManager.instance.getRandomInt(min, max, 1);
// [min,max] 得到一个两数之间的随机整数,包括两个数在内,这个值比min大(如果min不是整数,那就不小于比min大的整数),但小于(但不等于)max
RandomManager.instance.getRandomInt(min, max, 2);
// (min,max) 得到一个两数之间的随机整数
RandomManager.instance.getRandomInt(min, max, 3);
+Example
var min = 1;
var max = 10;
// [min,max) 得到一个两数之间的随机整数,这个值不小于min(如果min不是整数的话,得到一个向上取整的 min),并且小于(但不等于)max
RandomManager.instance.getRandomInt(min, max, 1);
// [min,max] 得到一个两数之间的随机整数,包括两个数在内,这个值比min大(如果min不是整数,那就不小于比min大的整数),但小于(但不等于)max
RandomManager.instance.getRandomInt(min, max, 2);
// (min,max) 得到一个两数之间的随机整数
RandomManager.instance.getRandomInt(min, max, 3);
diff --git a/docs/classes/ResLoader.html b/docs/classes/ResLoader.html
index 957a263..9f85b8f 100644
--- a/docs/classes/ResLoader.html
+++ b/docs/classes/ResLoader.html
@@ -105,7 +105,7 @@
加载一个资源
-Example
oops.res.load("spine_path", sp.SkeletonData, (err: Error | null, sd: sp.SkeletonData) => {
});
+Example
oops.res.load("spine_path", sp.SkeletonData, (err: Error | null, sd: sp.SkeletonData) => {
});
@@ -299,7 +299,7 @@
加载资源包
-Example
var serverUrl = "http://192.168.1.8:8080/"; // 服务器地址
var md5 = "8e5c0"; // Cocos Creator 构建后的MD5字符
await oops.res.loadBundle(serverUrl,md5);
+Example
var serverUrl = "http://192.168.1.8:8080/"; // 服务器地址
var md5 = "8e5c0"; // Cocos Creator 构建后的MD5字符
await oops.res.loadBundle(serverUrl,md5);
@@ -365,7 +365,7 @@
加载文件夹中的资源
-Example
// 加载进度事件
var onProgressCallback = (finished: number, total: number, item: any) => {
console.log("资源加载进度", finished, total);
}
// 加载完成事件
var onCompleteCallback = () => {
console.log("资源加载完成");
}
oops.res.loadDir("game", onProgressCallback, onCompleteCallback);
+Example
// 加载进度事件
var onProgressCallback = (finished: number, total: number, item: any) => {
console.log("资源加载进度", finished, total);
}
// 加载完成事件
var onCompleteCallback = () => {
console.log("资源加载完成");
}
oops.res.loadDir("game", onProgressCallback, onCompleteCallback);
@@ -559,7 +559,7 @@
加载远程资源
-Example
var opt: IRemoteOptions = { ext: ".png" };
var onComplete = (err: Error | null, data: ImageAsset) => {
const texture = new Texture2D();
texture.image = data;
const spriteFrame = new SpriteFrame();
spriteFrame.texture = texture;
var sprite = this.sprite.addComponent(Sprite);
sprite.spriteFrame = spriteFrame;
}
oops.res.loadRemote<ImageAsset>(this.url, opt, onComplete);
+Example
var opt: IRemoteOptions = { ext: ".png" };
var onComplete = (err: Error | null, data: ImageAsset) => {
const texture = new Texture2D();
texture.image = data;
const spriteFrame = new SpriteFrame();
spriteFrame.texture = texture;
var sprite = this.sprite.addComponent(Sprite);
sprite.spriteFrame = spriteFrame;
}
oops.res.loadRemote<ImageAsset>(this.url, opt, onComplete);
diff --git a/docs/classes/Root.html b/docs/classes/Root.html
index ad1dde4..ff81dea 100644
--- a/docs/classes/Root.html
+++ b/docs/classes/Root.html
@@ -187,7 +187,7 @@
Zh
该组件被附加到的节点。组件总会附加到一个节点。
-Example
import { log } from 'cc';
log(comp.node);
+Example
import { log } from 'cc';
log(comp.node);
Inherited from Component.node
@@ -230,7 +230,7 @@
Zh
返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。
Read Only
-Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
+Example
import { log } from 'cc';
log(this._isOnLoadCalled > 0);
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -251,7 +251,7 @@
Default
true
-Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
+Example
import { log } from 'cc';
comp.enabled = true;
log(comp.enabled);
Returns boolean
@@ -280,7 +280,7 @@
Zh
表示该组件是否被启用并且所在的节点也处于激活状态。
Read Only
-Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
+Example
import { log } from 'cc';
log(comp.enabledInHierarchy);
Returns boolean
@@ -332,7 +332,7 @@ but this is often caused by a particular logical requirements, which is not norm
Default
true
Read Only
-Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
+Example
import { Node, log } from 'cc';
const node = new Node();
log(node.isValid); // true
node.destroy();
log(node.isValid); // true, still valid in this frame
// after a frame...
log(node.isValid); // false, destroyed in the end of last frame
Returns boolean
@@ -390,7 +390,7 @@ but this is often caused by a particular logical requirements, which is not norm
Zh
组件的 uuid,用于编辑器。
Read Only
-Example
import { log } from 'cc';
log(comp.uuid);
+Example
import { log } from 'cc';
log(comp.uuid);
Returns string
@@ -445,7 +445,7 @@ This method should be removed if script priority is supported.
Deprecated
since v3.5.0, this is an engine private interface that will be removed in the future.
-Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
+Example
// You can override the _destruct method if you need, for example:
_destruct: function () {
for (var key in this) {
if (this.hasOwnProperty(key)) {
switch (typeof this[key]) {
case 'string':
this[key] = '';
break;
case 'object':
case 'function':
this[key] = null;
break;
}
}
}
Returns void
@@ -526,7 +526,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.addComponent(Sprite);
@@ -554,7 +554,7 @@ a custom axis aligned bounding box (AABB), so the editor's scene view can pe
Zh
向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。
-Example
const test = node.addComponent("Test");
+Example
const test = node.addComponent("Test");
@@ -589,7 +589,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
+Example
import { Sprite } from 'cc';
// get sprite component.
var sprite = node.getComponent(Sprite);
@@ -619,7 +619,7 @@ You can also get component in the node by passing in the name of the script.
Zh
获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
传入参数也可以是脚本的名称。
-Example
// get custom test calss.
var test = node.getComponent("Test");
+Example
// get custom test calss.
var test = node.getComponent("Test");
@@ -643,7 +643,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprite = node.getComponentInChildren(Sprite);
@@ -671,7 +671,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找所有子节点中第一个匹配指定类型的组件。
-Example
var Test = node.getComponentInChildren("Test");
+Example
var Test = node.getComponentInChildren("Test");
@@ -695,7 +695,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponents(Sprite);
@@ -723,7 +723,7 @@ You can also get component in the node by passing in the name of the script.
Zh
返回节点上指定类型的所有组件。
-Example
const tests = node.getComponents("Test");
+Example
const tests = node.getComponents("Test");
@@ -747,7 +747,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
+Example
import { Sprite } from 'cc';
const sprites = node.getComponentsInChildren(Sprite);
@@ -775,7 +775,7 @@ You can also get component in the node by passing in the name of the script.
Zh
递归查找自身或所有子节点中指定类型的组件。
-Example
const tests = node.getComponentsInChildren("Test");
+Example
const tests = node.getComponentsInChildren("Test");
@@ -1003,7 +1003,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
Zh
使用定时器系统调度一个自定义的回调任务。
如果回调任务已调度,那么将不会重复调度它,只会更新时间间隔参数。
-Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
+Example
import { log } from 'cc';
this.schedule((dt) => void log(`time: ${dt}`), 1);
@@ -1043,7 +1043,7 @@ If the task is already scheduled, then the interval parameter will be updated wi
See
-Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
+Example
import { log } from 'cc';
this.scheduleOnce((dt) => void log(`time: ${dt}`), 2);
@@ -1089,7 +1089,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度一个自定义的回调任务。
-Example
this.unschedule(_callback);
+Example
this.unschedule(_callback);
@@ -1113,7 +1113,7 @@ You can only call its super class method inside it. It should not be called manu
Zh
取消调度所有已调度的回调函数。
-Example
this.unscheduleAllCallbacks();
+Example
this.unscheduleAllCallbacks();
Returns void
diff --git a/docs/classes/StringUtil.html b/docs/classes/StringUtil.html
index b133715..99a056c 100644
--- a/docs/classes/StringUtil.html
+++ b/docs/classes/StringUtil.html
@@ -93,7 +93,7 @@
转中文单位计数
-Example
12345 = 1.23万
+Example
12345 = 1.23万
@@ -117,7 +117,7 @@
转英文单位计数
-Example
12345 = 12.35K
+Example
12345 = 12.35K
@@ -141,7 +141,7 @@
转美式计数字符串
-Example
123456789 = 123,456,789
+Example
123456789 = 123,456,789
diff --git a/docs/classes/Timer.html b/docs/classes/Timer.html
index 58451f3..8e4a27f 100644
--- a/docs/classes/Timer.html
+++ b/docs/classes/Timer.html
@@ -16,7 +16,7 @@
定时跳动组件
-Example
export class Test extends Component {
// 创建一个定时跳动组件
private timer: Timer = new Timer(1);
update(dt: number) {
if (this.timer.update(this.dt)) {
console.log(每一秒触发一次);
}
}
}
+Example
export class Test extends Component {
// 创建一个定时跳动组件
private timer: Timer = new Timer(1);
update(dt: number) {
if (this.timer.update(this.dt)) {
console.log(每一秒触发一次);
}
}
}
diff --git a/docs/classes/TimerManager.html b/docs/classes/TimerManager.html
index 10a9da8..04b4c77 100644
--- a/docs/classes/TimerManager.html
+++ b/docs/classes/TimerManager.html
@@ -290,7 +290,7 @@
在指定对象上注册一个倒计时的回调管理器
Returns
-Example
export class Test extends Component {
private timeId!: string;
start() {
// 在指定对象上注册一个倒计时的回调管理器
this.timeId = oops.timer.register(this, "countDown", this.onSecond, this.onComplete);
}
private onSecond() {
console.log("每秒触发一次");
}
private onComplete() {
console.log("倒计时完成触发");
}
}
+Example
export class Test extends Component {
private timeId!: string;
start() {
// 在指定对象上注册一个倒计时的回调管理器
this.timeId = oops.timer.register(this, "countDown", this.onSecond, this.onComplete);
}
private onSecond() {
console.log("每秒触发一次");
}
private onComplete() {
console.log("倒计时完成触发");
}
}
@@ -334,7 +334,7 @@
Returns
string
-Example
oops.timer.schedule(()=>{
// 每秒触发一次
}, 1000);
+Example
oops.timer.schedule(()=>{
// 每秒触发一次
}, 1000);
@@ -360,7 +360,7 @@
Returns
string
-Example
oops.timer.scheduleOnce(()=>{
// 1秒后触发一次后不会在触发
}, 1000);
+Example
oops.timer.scheduleOnce(()=>{
// 1秒后触发一次后不会在触发
}, 1000);
@@ -401,7 +401,7 @@
在指定对象上注销一个倒计时的回调管理器
-Example
export class Test extends Component {
private timeId!: string;
start() {
this.timeId = oops.timer.register(this, "countDown", this.onSecond, this.onComplete);
}
onDestroy() {
// 在指定对象上注销一个倒计时的回调管理器
oops.timer.unRegister(this.timeId);
}
}
+Example
export class Test extends Component {
private timeId!: string;
start() {
this.timeId = oops.timer.register(this, "countDown", this.onSecond, this.onComplete);
}
onDestroy() {
// 在指定对象上注销一个倒计时的回调管理器
oops.timer.unRegister(this.timeId);
}
}
@@ -421,7 +421,7 @@
删除一个时间触发器
-Example
var uuid = oops.timer.schedule(()=>{
// 每秒触发一次
}, 1000);
// 删除指定标识的触发器
oops.timer.unschedule(uuid);
+Example
var uuid = oops.timer.schedule(()=>{
// 每秒触发一次
}, 1000);
// 删除指定标识的触发器
oops.timer.unschedule(uuid);
diff --git a/docs/index.html b/docs/index.html
index 84d94a6..81593ca 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -10,32 +10,83 @@
oops-framework
-
+
+
介绍
-oops-plugin-framework 是基于 Cocos Creator 3.x 以插件形式使用的游戏框架,此版本框架代码与游戏具体业务逻辑代码分离,方便在项目开发过程随时更新框架最新版本代码。
+Oops Framework 基于 Cocos Creato 3.x 开发的一款游戏框架。
+
+- 提供游戏常用功能库,提高开发效率
+- 提供业务模块代码模板,降低程序设计难度
+- 框架内置模块低耦合,可自行删减不需要的模块,适应不同类型的游
+- 框架提供游戏常用插件工具
+- 热更新配置生成插件
+- 策划Excel配置表生成Json格式与配套ts代码插件
+
+
+
技术文档
+
+ 使用说明
+
+
+- 下载教程项目
+
+git clone https://gitee.com/dgflash/oops-framework.git
+
+
+下载框架插件
+
+
+ windows
+
+ 执行根目录下的 update-oops-plugin-framework.bat 下载最新版本框架插件
+
+
+ mac
+
+ 项目下载后执行 update-oops-plugin-framework.sh 下载最新版本框架插件
+
+
+
+
+ 在线演示
+
+
+- 框架部分功能演示
+- 全栈解决方案 oops-moba
+- 游戏地图模块 oops-rpg-2d
+- 游戏地图模块 oops-rpg-3d
+- 新手引导模块 oops-guide
+- 开源框架 oops-framework gitee
+- 开源框架 oops-framework github
+
+
框架目录结构
-core - 框加核心技术库
common - 游戏公共模块
audio - 音频模块
event - 全局事件
loader - 加载模块
log - 日志模块
manager - 时间管理、随机管理
storage - 本地存储
game - 游戏世界类
gui - 游戏界面类
layer - 多层界面、窗口管理
prompt - 公共提示窗口
utils - 游戏各类工具库
Oops.ts - 框架功能访问接口
Root.ts - 框架视图层根节点管理组件
libs - 框架中可选技术库
animator - 动画状态机
animator-effect - 动画特效组件
animator-move - 动画移动组件
behavior-tree - 行为树框架
camera - 三维摄像机控制组件
collection - 数据集合处理
ecs - ECS框架
gui - 界面组件
badge - 红点提示组件
button - 按钮组件
label - 标签组件
language - 多语言组件
model-view - MVVM框架
network - 网络模块
render-texture - 渲染纹理组件
security - 安全组件
module - 游戏通用模块
common - 公共模块
config - 配置模块
+core - 框加核心技术库
common - 游戏公共模块
audio - 音频模块
event - 全局事件
loader - 加载模块
log - 日志模块
manager - 时间管理、随机管理
storage - 本地存储
game - 游戏世界类
gui - 游戏界面类
layer - 多层界面、窗口管理
prompt - 公共提示窗口
utils - 游戏各类工具库
Oops.ts - 框架功能访问接口
Root.ts - 框架视图层根节点管理组件
libs - 框架中可选技术库
animator - 动画状态机
animator-effect - 动画特效组件
animator-move - 动画移动组件
behavior-tree - 行为树框架
camera - 三维摄像机控制组件
collection - 数据集合处理
ecs - ECS框架
gui - 界面组件
badge - 红点提示组件
button - 按钮组件
label - 标签组件
language - 多语言组件
model-view - MVVM框架
network - 网络模块
render-texture - 渲染纹理组件
security - 安全组件
module - 游戏通用模块
common - 公共模块
config - 配置模块
-
-
- 学习交流 QQ 群:798575969
-
-
+
+学习交流 QQ 群:798575969
+ 
+
+
音频管理
-Example