mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
@@ -754,8 +754,10 @@ var Component = cc.Class({
|
||||
* @param {Number} [repeat=cc.macro.REPEAT_FOREVER] The selector will be executed (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
|
||||
* @param {Number} [delay=0] The amount of time that the first tick will wait before execution.
|
||||
* @example
|
||||
* var squashAction = cc.scaleTo(0.2, 1, 0.6);
|
||||
* this.seq = cc.sequence(squashAction);
|
||||
* var timeCallback = function (dt) {
|
||||
* cc.log("time: " + dt);
|
||||
* }
|
||||
* this.schedule(timeCallback, 1);
|
||||
*/
|
||||
schedule: function (callback, interval, repeat, delay) {
|
||||
cc.assert(callback, cc._LogInfos.Node.schedule);
|
||||
@@ -776,8 +778,10 @@ var Component = cc.Class({
|
||||
* @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.
|
||||
* @example
|
||||
* var squashAction = cc.scaleTo(0.2, 1, 0.6);
|
||||
* this.seq = cc.scheduleOnce(squashAction);
|
||||
* var timeCallback = function (dt) {
|
||||
* cc.log("time: " + dt);
|
||||
* }
|
||||
* this.scheduleOnce(timeCallback, 2);
|
||||
*/
|
||||
scheduleOnce: function (callback, delay) {
|
||||
this.schedule(callback, 0, 0, delay);
|
||||
|
||||
@@ -566,7 +566,7 @@ cc.rectUnion = function (rectA, rectB) {
|
||||
/**
|
||||
* !#en Returns the overlapping portion of 2 rectangles.
|
||||
* !#zh 返回 2 个矩形重叠的部分。
|
||||
* @method rectUnion
|
||||
* @method rectIntersection
|
||||
* @param {Rect} rectA
|
||||
* @param {Rect} rectB
|
||||
* @return {Rect}
|
||||
|
||||
Reference in New Issue
Block a user