Skip to content

Commit

Permalink
Merge pull request #32 from nantas/master
Browse files Browse the repository at this point in the history
correct example path.
  • Loading branch information
nantas committed Dec 10, 2015
2 parents ce7e12d + 3981104 commit da1e34e
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion cocos2d/core/CCActionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cc.HashElement = cc._Class.extend(/** @lends cc.HashElement# */{
*
* @class ActionManager
* @extends _Class
* @example {@link utils/api/cocos/docs/cocos2d/core/CCActionManager/ActionManager.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCActionManager/ActionManager.js}
*/
cc.ActionManager = cc._Class.extend(/** @lends cc.ActionManager# */{
_hashTargets:null,
Expand Down
10 changes: 5 additions & 5 deletions cocos2d/core/CCScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ cc.Scheduler = cc._Class.extend(/** @lends cc.Scheduler# */{
* @param {Number} repeat
* @param {Number} delay
* @param {Boolean} paused
* @example {@link utils/api/cocos/docs/cocos2d/core/CCScheduler/scheduleCallbackForTarget.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCScheduler/scheduleCallbackForTarget.js}
*/
scheduleCallbackForTarget: function(target, callback_fn, interval, repeat, delay, paused){
//cc.log("scheduleCallbackForTarget is deprecated. Please use schedule.");
Expand All @@ -566,7 +566,7 @@ cc.Scheduler = cc._Class.extend(/** @lends cc.Scheduler# */{
* @param {Number} delay
* @param {Boolean} paused
* @param {Number} key
* @example {@link utils/api/cocos/docs/cocos2d/core/CCScheduler/schedule.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCScheduler/schedule.js}
*/
schedule: function(callback, target, interval, repeat, delay, paused, key){
var isSelector = false;
Expand Down Expand Up @@ -990,7 +990,7 @@ cc.Scheduler = cc._Class.extend(/** @lends cc.Scheduler# */{
* @param {_Class} target
* @param {Number} priority
* @param {Boolean} paused
* @example {@link utils/api/cocos/docs/cocos2d/core/CCScheduler/scheduleUpdateForTarget.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCScheduler/scheduleUpdateForTarget.js}
*/
scheduleUpdateForTarget: function(target, priority, paused){
//cc.log("scheduleUpdateForTarget is deprecated. Please use scheduleUpdate.");
Expand All @@ -1006,7 +1006,7 @@ cc.Scheduler = cc._Class.extend(/** @lends cc.Scheduler# */{
* @deprecated since v3.4 please use .unschedule
* @param {_Class} target
* @param {Function} callback - callback[Function] or key[String]
* @example {@link utils/api/cocos/docs/cocos2d/core/CCScheduler/unscheduleCallbackForTarget.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCScheduler/unscheduleCallbackForTarget.js}
*/
unscheduleCallbackForTarget:function (target, callback) {
//cc.log("unscheduleCallbackForTarget is deprecated. Please use unschedule.");
Expand All @@ -1018,7 +1018,7 @@ cc.Scheduler = cc._Class.extend(/** @lends cc.Scheduler# */{
* @method unscheduleUpdateForTarget
* @param {_Class} target
* @deprecated since v3.4 please use .unschedule
* @example {@link utils/api/cocos/docs/cocos2d/core/CCScheduler/unscheduleUpdateForTarget.js}
* @example {@link utils/api/engine/docs/cocos2d/core/CCScheduler/unscheduleUpdateForTarget.js}
*/
unscheduleUpdateForTarget:function (target) {
//cc.log("unscheduleUpdateForTarget is deprecated. Please use unschedule.");
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/event-manager/CCEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ cc._EventListenerTouchAllAtOnce.create = function(){
* @param {Object} argObj a json object
* @returns {EventListener}
* todo: It should be the direct use new
* @example {@link utils/api/cocos/docs/cocos2d/core/event-manager/CCEventListener/create.js}
* @example {@link utils/api/engine/docs/cocos2d/core/event-manager/CCEventListener/create.js}
*/
cc.EventListener.create = function(argObj){

Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/event/event-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ JS.mixin(EventTarget.prototype, {
* @method _getCapturingTargets
* @param {String} type - the event type
* @param {Array} array - the array to receive targets
* @example {@link utils/api/cocos/docs/cocos2d/core/event/_getCapturingTargets.js}
* @example {@link utils/api/engine/docs/cocos2d/core/event/_getCapturingTargets.js}
*/
_getCapturingTargets: function (type, array) {

Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/platform/CCCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cc.associateWithNative = function (jsObj, superclass) {
*
* @constant
* @type {Object}
* @example {@link utils/api/cocos/docs/cocos2d/core/platform/CCCommon/KEY.js}
* @example {@link utils/api/engine/docs/cocos2d/core/platform/CCCommon/KEY.js}
*/
cc.KEY = {
none:0,
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/platform/CCMacro.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ cc.swap = function (x, y, ref) {
* @param {Number} b number B
* @param {Number} r ratio between 0 and 1
* @method lerp
* @example {@link utils/api/cocos/docs/cocos2d/core/platform/CCMacro/.js}
* @example {@link utils/api/engine/docs/cocos2d/core/platform/CCMacro/.js}
*/
cc.lerp = function (a, b, r) {
return a + (b - a) * r;
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/platform/attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var isPlainEmptyObj = require('./utils').isPlainEmptyObj_DEV;
* @param {String} propertyName - the name of property or function, used to retrieve the attributes
* @param {Object} [attributes] - the attribute table to mark, new attributes will merged with existed attributes. Attribute whose key starts with '_' will be ignored.
* @return {Object|Undefined} return all attributes associated with the property. if none undefined will be returned
* @example {@link utils/api/cocos/docs/cocos2d/core/platform/attribute/attr.js}
* @example {@link utils/api/engine/docs/cocos2d/core/platform/attribute/attr.js}
*/
function attr (constructor, propertyName, attributes) {
var key = '_attr$' + propertyName;
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/platform/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cc.url = {
* @method raw
* @param {String} url
* @return {String}
* @example {@link utils/api/cocos/docs/cocos2d/core/platform/url/raw.js}
* @example {@link utils/api/engine/docs/cocos2d/core/platform/url/raw.js}
*/
raw: function (url) {
if (!this._rawAssets && CC_EDITOR) {
Expand All @@ -53,7 +53,7 @@ cc.url = {
* @method builtinRaw
* @param {String} url
* @return {String}
* @example {@link utils/api/cocos/docs/cocos2d/core/platform/url/builtinRaw.js}
* @example {@link utils/api/engine/docs/cocos2d/core/platform/url/builtinRaw.js}
*/
builtinRaw: function (url) {
if (!this._rawAssets && CC_EDITOR) {
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/sprites/CCSpriteFrameCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ cc.spriteFrameCache = /** @lends cc.spriteFrameCache# */{
* @method addSpriteFrames
* @param {String} url - file path
* @param {HTMLImageElement|Texture2D|string} texture
* @example {@link utils/api/cocos/docs/cocos2d/core/sprites/addSpriteFrames.js}
* @example {@link utils/api/engine/docs/cocos2d/core/sprites/addSpriteFrames.js}
*/
addSpriteFrames: function (url, texture) {
cc.assert(url, cc._LogInfos.spriteFrameCache.addSpriteFrames_2);
Expand Down Expand Up @@ -338,7 +338,7 @@ cc.spriteFrameCache = /** @lends cc.spriteFrameCache# */{
* @method getSpriteFrame
* @param {String} name - name of SpriteFrame
* @return {SpriteFrame}
* @example {@link utils/api/cocos/docs/cocos2d/core/sprites/getSpriteFrame.js}
* @example {@link utils/api/engine/docs/cocos2d/core/sprites/getSpriteFrame.js}
*/
getSpriteFrame: function (name) {
var self = this, frame = self._spriteFrames[name];
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/support/CCPointExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cc.pNeg = function (point) {
* @param {Vec2} v1
* @param {Vec2} v2
* @return {Vec2}
* @examples {@link utils/api/cocos/docs/cocos2d/core/support/pAdd.js}
* @examples {@link utils/api/engine/docs/cocos2d/core/support/pAdd.js}
*/
cc.pAdd = function (v1, v2) {
return cc.p(v1.x + v2.x, v1.y + v2.y);
Expand Down Expand Up @@ -298,7 +298,7 @@ cc.pFromSize = function (s) {
* @param {Vec2} p
* @param {Function} opFunc
* @return {Vec2}
* @example {@link utils/api/cocos/docs/cocos2d/core/support/pCompOp.js}
* @example {@link utils/api/engine/docs/cocos2d/core/support/pCompOp.js}
*/
cc.pCompOp = function (p, opFunc) {
return cc.p(opFunc(p.x), opFunc(p.y));
Expand Down
6 changes: 3 additions & 3 deletions cocos2d/core/textures/CCTextureAtlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var TextureAtlas = Class.extend(/** @lends cc.TextureAtlas# */{ //WebGL only
* @constructor
* @param {String|Texture2D} fileName
* @param {Number} capacity
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/TextureAtlas.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/TextureAtlas.js}
*/
ctor: function (fileName, capacity) {
this._buffersVBO = [];
Expand Down Expand Up @@ -209,7 +209,7 @@ var TextureAtlas = Class.extend(/** @lends cc.TextureAtlas# */{ //WebGL only
* @param {String} file
* @param {Number} capacity
* @return {Boolean}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/initWithFile.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/initWithFile.js}
*/
initWithFile: function (file, capacity) {
// retained in property
Expand All @@ -231,7 +231,7 @@ var TextureAtlas = Class.extend(/** @lends cc.TextureAtlas# */{ //WebGL only
* @param {Image} texture
* @param {Number} capacity
* @return {Boolean}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/initWithTexture.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/initWithTexture.js}
*/
initWithTexture: function (texture, capacity) {
cc.assert(texture, cc._LogInfos.TextureAtlas.initWithTexture);
Expand Down
16 changes: 8 additions & 8 deletions cocos2d/core/textures/CCTextureCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var textureCache = /** @lends cc.textureCache# */{
* @param {String} textureKeyName
* @return {Texture2D|Null}
* @deprecated
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/textureForKey.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/textureForKey.js}
*/
textureForKey: function (textureKeyName) {
cc.log(cc._LogInfos.textureCache.textureForKey);
Expand All @@ -80,7 +80,7 @@ var textureCache = /** @lends cc.textureCache# */{
* @method getTextureForKey
* @param {String} textureKeyName
* @return {Texture2D|Null}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/getTextureForKey.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/getTextureForKey.js}
*/
getTextureForKey: function(textureKeyName){
return this._textures[textureKeyName] || this._textures[cc.loader.getAliase(textureKeyName)];
Expand All @@ -90,7 +90,7 @@ var textureCache = /** @lends cc.textureCache# */{
* @method getKeyByTexture
* @param {Image} texture
* @return {String|Null}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/getKeyByTexture.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/getKeyByTexture.js}
*/
getKeyByTexture: function (texture) {
for (var key in this._textures) {
Expand All @@ -109,7 +109,7 @@ var textureCache = /** @lends cc.textureCache# */{
* @method getTextureColors
* @param {Image} texture
* @return {Array}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/getTextureColors.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/getTextureColors.js}
*/
getTextureColors: function (texture) {
var image = texture._htmlElementObj;
Expand All @@ -133,7 +133,7 @@ var textureCache = /** @lends cc.textureCache# */{
* In the medium term: it will allocate more resources <br />
* In the long term: it will be the same</p>
* @method removeAllTextures
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/removeAllTextures.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/removeAllTextures.js}
*/
removeAllTextures: function () {
var locTextures = this._textures;
Expand All @@ -148,7 +148,7 @@ var textureCache = /** @lends cc.textureCache# */{
* Deletes a texture from the cache given a texture.
* @method removeTexture
* @param {Image} texture
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/removeTexture.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/removeTexture.js}
*/
removeTexture: function (texture) {
if (!texture)
Expand All @@ -167,7 +167,7 @@ var textureCache = /** @lends cc.textureCache# */{
* Deletes a texture from the cache given a its key name.
* @method removeTextureForKey
* @param {String} textureKeyName
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/removeTextureForKey.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/removeTextureForKey.js}
*/
removeTextureForKey: function (textureKeyName) {
if (textureKeyName == null)
Expand All @@ -187,7 +187,7 @@ var textureCache = /** @lends cc.textureCache# */{
* @param {Function} cb
* @param {Object} target
* @return {Texture2D}
* @example {@link utils/api/cocos/docs/cocos2d/core/textures/addImage.js}
* @example {@link utils/api/engine/docs/cocos2d/core/textures/addImage.js}
*/
addImage: null,
addImageAsync: null,
Expand Down
12 changes: 6 additions & 6 deletions cocos2d/core/utils/CCPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cc.path = /** @lends cc.path# */{
/**
* Join strings to be a path.
* @method join
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/join.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/join.js}
* @returns {String}
*/
join: function () {
Expand All @@ -24,7 +24,7 @@ cc.path = /** @lends cc.path# */{
/**
* Get the ext name of a path.
* @method extname
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/extname.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/extname.js}
* @param {String} pathStr
* @returns {*}
*/
Expand Down Expand Up @@ -52,7 +52,7 @@ cc.path = /** @lends cc.path# */{
/**
* Get the file name of a file path.
* @method basename
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/basename.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/basename.js}
* @param {String} pathStr
* @param {String} [extname]
* @returns {*}
Expand All @@ -72,7 +72,7 @@ cc.path = /** @lends cc.path# */{
/**
* Get dirname of a file path.
* @method dirname
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/dirname.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/dirname.js}
* @param {String} pathStr
* @returns {*}
*/
Expand All @@ -83,7 +83,7 @@ cc.path = /** @lends cc.path# */{
/**
* Change extname of a file path.
* @method changeExtname
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/changeExtname.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/changeExtname.js}
* @param {String} pathStr
* @param {String} [extname]
* @returns {String}
Expand All @@ -102,7 +102,7 @@ cc.path = /** @lends cc.path# */{
},
/**
* Change file name of a file path.
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/CCPath/changeBasename.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/CCPath/changeBasename.js}
* @param {String} pathStr
* @param {String} basename
* @param {Boolean} [isSameExt]
Expand Down
7 changes: 4 additions & 3 deletions cocos2d/core/utils/base-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{

/**
* The parent of the node.
* @property name
* @property parent
* @type {Node}
* @default null
*/
Expand Down Expand Up @@ -160,6 +160,7 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{

/**
* The uuid for editor, will be stripped before building project
* @property uuid
* @type {String}
* @readOnly
*/
Expand Down Expand Up @@ -589,7 +590,7 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{

/**
* Returns the scale factor of the node.
* @warning: Assertion will fail when _scaleX != _scaleY.
* Assertion will fail when _scaleX != _scaleY.
* @method getScale
* @return {Number} The scale factor
*/
Expand Down Expand Up @@ -629,7 +630,7 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{
* @method setPosition
* @param {Vec2|Number} newPosOrxValue - The position (x,y) of the node in coordinates or the X coordinate for position
* @param {Number} [yValue] - Y coordinate for position
* @example {@link utils/api/cocos/docs/cocos2d/core/utils/node-wrapper/setPosition.js}
* @example {@link utils/api/engine/docs/cocos2d/core/utils/node-wrapper/setPosition.js}
*/
setPosition: function (newPosOrxValue, yValue) {
var locPosition = this._position;
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/value-types/CCColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ cc.Color = Color;
* @param {Number} [a=255]
* @return {Color}
*
* @examples {@link utils/api/cocos/docs/cocos2d/core/value-types/CCColor/color.js}
* @examples {@link utils/api/engine/docs/cocos2d/core/value-types/CCColor/color.js}
*/
cc.color = function color (r, g, b, a) {
if (JS.isString(r)) {
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/value-types/CCSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ proto.toString = function () {
* @param {Number|Size} w - width or a size object
* @param {Number} h - height
* @return {Size}
* @example {@link utils/api/cocos/docs/cocos2d/core/value-types/CCSize/size.js}
* @example {@link utils/api/engine/docs/cocos2d/core/value-types/CCSize/size.js}
*/
cc.size = function (w, h) {
return new Size(w, h);
Expand Down

0 comments on commit da1e34e

Please sign in to comment.