mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
modify the note for periodic function (#3140)
This commit is contained in:
@@ -217,8 +217,10 @@ var Component = cc.Class({
|
||||
// We provide Pre methods, which are called right before something happens, and Post methods which are called right after something happens.
|
||||
|
||||
/**
|
||||
* !#en Update is called every frame, if the Component is enabled.
|
||||
* !#zh 如果该组件启用,则每帧调用 update。
|
||||
* !#en Update is called every frame, if the Component is enabled.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh 如果该组件启用,则每帧调用 update。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method update
|
||||
* @param {Number} dt - the delta time in seconds it took to complete the last frame
|
||||
* @protected
|
||||
@@ -226,8 +228,10 @@ var Component = cc.Class({
|
||||
update: null,
|
||||
|
||||
/**
|
||||
* !#en LateUpdate is called every frame, if the Component is enabled.
|
||||
* !#zh 如果该组件启用,则每帧调用 LateUpdate。
|
||||
* !#en LateUpdate is called every frame, if the Component is enabled.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh 如果该组件启用,则每帧调用 LateUpdate。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method lateUpdate
|
||||
* @protected
|
||||
*/
|
||||
@@ -247,9 +251,11 @@ var Component = cc.Class({
|
||||
/**
|
||||
* !#en
|
||||
* When attaching to an active node or its node first activated.
|
||||
* onLoad is always called before any start functions, this allows you to order initialization of scripts.
|
||||
* onLoad is always called before any start functions, this allows you to order initialization of scripts.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh
|
||||
* 当附加到一个激活的节点上或者其节点第一次激活时候调用。onLoad 总是会在任何 start 方法调用前执行,这能用于安排脚本的初始化顺序。
|
||||
* 当附加到一个激活的节点上或者其节点第一次激活时候调用。onLoad 总是会在任何 start 方法调用前执行,这能用于安排脚本的初始化顺序。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method onLoad
|
||||
* @protected
|
||||
*/
|
||||
@@ -258,33 +264,41 @@ var Component = cc.Class({
|
||||
/**
|
||||
* !#en
|
||||
* Called before all scripts' update if the Component is enabled the first time.
|
||||
* Usually used to initialize some logic which need to be called after all components' `onload` methods called.
|
||||
* Usually used to initialize some logic which need to be called after all components' `onload` methods called.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh
|
||||
* 如果该组件第一次启用,则在所有组件的 update 之前调用。通常用于需要在所有组件的 onLoad 初始化完毕后执行的逻辑。
|
||||
* 如果该组件第一次启用,则在所有组件的 update 之前调用。通常用于需要在所有组件的 onLoad 初始化完毕后执行的逻辑。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method start
|
||||
* @protected
|
||||
*/
|
||||
start: null,
|
||||
|
||||
/**
|
||||
* !#en Called when this component becomes enabled and its node is active.
|
||||
* !#zh 当该组件被启用,并且它的节点也激活时。
|
||||
* !#en Called when this component becomes enabled and its node is active.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh 当该组件被启用,并且它的节点也激活时。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method onEnable
|
||||
* @protected
|
||||
*/
|
||||
onEnable: null,
|
||||
|
||||
/**
|
||||
* !#en Called when this component becomes disabled or its node becomes inactive.
|
||||
* !#zh 当该组件被禁用或节点变为无效时调用。
|
||||
* !#en Called when this component becomes disabled or its node becomes inactive.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh 当该组件被禁用或节点变为无效时调用。<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method onDisable
|
||||
* @protected
|
||||
*/
|
||||
onDisable: null,
|
||||
|
||||
/**
|
||||
* !#en Called when this component will be destroyed.
|
||||
* !#zh 当该组件被销毁时调用
|
||||
* !#en Called when this component will be destroyed.<br/>
|
||||
* This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.
|
||||
* !#zh 当该组件被销毁时调用<br/>
|
||||
* 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。
|
||||
* @method onDestroy
|
||||
* @protected
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user