mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Updated documentation
This commit is contained in:
+12
-12
@@ -864,7 +864,7 @@ var Node = cc.Class({
|
||||
* Executes an action, and returns the action that is executed.<br/>
|
||||
* The node becomes the action's target. Refer to cc.Action's getTarget()
|
||||
* Calling runAction while the node is not active won't have any effect
|
||||
* @function
|
||||
* @method runAction
|
||||
* @param {cc.Action} action
|
||||
* @return {cc.Action} An Action pointer
|
||||
*/
|
||||
@@ -880,7 +880,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Stops and removes all actions from the running action list .
|
||||
* @function
|
||||
* @method stopAllActions
|
||||
*/
|
||||
stopAllActions: function () {
|
||||
var target = cc.sys.isNative ? this._sgNode : this;
|
||||
@@ -889,7 +889,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Stops and removes an action from the running action list.
|
||||
* @function
|
||||
* @method stopAction
|
||||
* @param {cc.Action} action An action object to be removed.
|
||||
*/
|
||||
stopAction: function (action) {
|
||||
@@ -898,7 +898,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Removes an action from the running action list by its tag.
|
||||
* @function
|
||||
* @method stopActionByTag
|
||||
* @param {Number} tag A tag that indicates the action to be removed.
|
||||
*/
|
||||
stopActionByTag: function (tag) {
|
||||
@@ -912,7 +912,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Returns an action from the running action list by its tag.
|
||||
* @function
|
||||
* @method getActionByTag
|
||||
* @see cc.Action#getTag and cc.Action#setTag
|
||||
* @param {Number} tag
|
||||
* @return {cc.Action} The action object with the given tag.
|
||||
@@ -930,7 +930,7 @@ var Node = cc.Class({
|
||||
* Composable actions are counted as 1 action. Example:<br/>
|
||||
* If you are running 1 Sequence of 7 actions, it will return 1. <br/>
|
||||
* If you are running 7 Sequences of 2 actions, it will return 7.</p>
|
||||
* @function
|
||||
* @method getNumberOfRunningActions
|
||||
* @return {Number} The number of actions that are running plus the ones that are schedule to run
|
||||
*/
|
||||
getNumberOfRunningActions: function () {
|
||||
@@ -943,7 +943,7 @@ var Node = cc.Class({
|
||||
/**
|
||||
* <p>Schedules a custom selector. <br/>
|
||||
* If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.</p>
|
||||
* @function
|
||||
* @method schedule
|
||||
* @param {function} callback The callback function
|
||||
* @param {Number} [interval=0] Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use scheduleUpdate() instead.
|
||||
* @param {Number} [repeat=cc.REPEAT_FOREVER] The selector will be executed (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
|
||||
@@ -968,7 +968,7 @@ var Node = cc.Class({
|
||||
* Scheduled callback functions with a lower priority will be called before the ones that have a higher value.<br/>
|
||||
* Only one "update" callback function could be scheduled per node (You can't have 2 'update' callback functions).<br/>
|
||||
* </p>
|
||||
* @function
|
||||
* @method scheduleUpdate
|
||||
* @param {Number} [priority=0] The priority of the update callback
|
||||
*/
|
||||
scheduleUpdate: function (priority) {
|
||||
@@ -978,7 +978,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Schedules a callback function that runs only once, with a delay of 0 or larger
|
||||
* @function
|
||||
* @method scheduleOnce
|
||||
* @see cc.Node#schedule
|
||||
* @param {function} callback A function wrapped as a selector
|
||||
* @param {Number} [delay=0] The amount of time that the first tick will wait before execution.
|
||||
@@ -989,7 +989,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Unschedules a custom callback function.
|
||||
* @function
|
||||
* @method unschedule
|
||||
* @see cc.Node#schedule
|
||||
* @param {function} callback_fn A function wrapped as a selector
|
||||
*/
|
||||
@@ -1002,7 +1002,7 @@ var Node = cc.Class({
|
||||
|
||||
/**
|
||||
* Unschedules the "update" method.
|
||||
* @function
|
||||
* @method unscheduleUpdate
|
||||
* @see cc.Node#scheduleUpdate
|
||||
*/
|
||||
unscheduleUpdate: function () {
|
||||
@@ -1012,7 +1012,7 @@ var Node = cc.Class({
|
||||
/**
|
||||
* <p>unschedule all scheduled callback functions: custom callback functions, and the 'update' callback function.<br/>
|
||||
* Actions are not affected by this method.</p>
|
||||
* @function
|
||||
* @method unscheduleAllCallbacks
|
||||
*/
|
||||
unscheduleAllCallbacks: function () {
|
||||
cc.director.getScheduler().unscheduleAllForTarget(this);
|
||||
|
||||
Reference in New Issue
Block a user