diff --git a/cocos2d/core/components/CCComponent.js b/cocos2d/core/components/CCComponent.js index 5dfbf7d239..4c484ac48a 100644 --- a/cocos2d/core/components/CCComponent.js +++ b/cocos2d/core/components/CCComponent.js @@ -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); diff --git a/cocos2d/core/value-types/CCRect.js b/cocos2d/core/value-types/CCRect.js index dc3153fb0b..8acb405854 100644 --- a/cocos2d/core/value-types/CCRect.js +++ b/cocos2d/core/value-types/CCRect.js @@ -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}