From a99c2c78936faa447a2a84bc02f7881b3202d940 Mon Sep 17 00:00:00 2001 From: dingpinglv Date: Wed, 18 Mar 2015 21:45:58 +0800 Subject: [PATCH] Issue : added js annotate to CCActionGrid.h, CCAnimation.h, CCAnimationCache.h, CCAtlasNode.h, CCRef.h --- cocos/2d/CCActionGrid.h | 15 ++++++++------- cocos/2d/CCAnimation.h | 2 +- cocos/2d/CCAnimationCache.h | 7 ++++++- cocos/2d/CCAtlasNode.h | 1 - cocos/base/CCRef.h | 7 ++++++- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/cocos/2d/CCActionGrid.h b/cocos/2d/CCActionGrid.h index e37f201ad0..00e8d3b671 100644 --- a/cocos/2d/CCActionGrid.h +++ b/cocos/2d/CCActionGrid.h @@ -99,7 +99,7 @@ public: * @brief Get the vertex that belongs to certain position in the grid. * @param position The position of the grid. * @return Return a pointer of vertex. - * @js NA + * @js vertex * @lua NA */ Vec3 getVertex(const Vec2& position) const; @@ -114,7 +114,7 @@ public: * @brief Get the non-transformed vertex that belongs to certain position in the grid. * @param position The position of the grid. * @return Return a pointer of vertex. - * @js NA + * @js originalVertex * @lua NA */ Vec3 getOriginalVertex(const Vec2& position) const; @@ -129,7 +129,7 @@ public: * @brief Set a new vertex to a certain position of the grid. * @param position The position of the grid. * @param vertex The vertex will be used on the certain position of grid. - * @js NA + * @js setVertex * @lua NA */ void setVertex(const Vec2& position, const Vec3& vertex); @@ -153,7 +153,6 @@ public: * @param duration The duration of the action. It's a value in seconds. * @param gridSize Specify the grid size of the action. * @return A pointer of TiledGrid3DAction. If creation failed, return nil. - * @js NA * @lua NA */ static TiledGrid3DAction* create(float duration, const Size& gridSize); @@ -162,7 +161,7 @@ public: * @brief Get the tile that belongs to a certain position of the grid. * @param position The position of the tile want to get. * @return A quadrilateral of the tile. - * @js NA + * @js tile * @lua NA */ Quad3 getTile(const Vec2& position) const; @@ -177,7 +176,7 @@ public: * @brief Get the non-transformed tile that belongs to a certain position of the grid. * @param position The position of the tile want to get. * @return A quadrilateral of the tile. - * @js NA + * @js originalTile * @lua NA */ Quad3 getOriginalTile(const Vec2& position) const; @@ -192,7 +191,6 @@ public: * @brief Set a new tile to a certain position of the grid. * @param position The position of the tile. * @param coords The quadrilateral of the new tile. - * @js NA * @lua NA */ void setTile(const Vec2& position, const Quad3& coords); @@ -210,6 +208,7 @@ public: /** @brief AccelDeccelAmplitude action. +@js NA */ class CC_DLL AccelDeccelAmplitude : public ActionInterval { @@ -261,6 +260,7 @@ private: /** @brief AccelAmplitude action. +@js NA */ class CC_DLL AccelAmplitude : public ActionInterval { @@ -306,6 +306,7 @@ private: /** @brief DeccelAmplitude action +@js NA */ class CC_DLL DeccelAmplitude : public ActionInterval { diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index 5b7027fe9a..0d3c5144a2 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -157,7 +157,6 @@ public: /* Creates an animation with an array of AnimationFrame, the delay per units in seconds and and how many times it should be executed. @since v2.0 - * @js NA */ static Animation* create(const Vector& arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops = 1); @@ -173,6 +172,7 @@ public: void addSpriteFrameWithFile(const std::string& filename); /** @deprecated. Use addSpriteFrameWithFile() instead + @js NA */ CC_DEPRECATED_ATTRIBUTE void addSpriteFrameWithFileName(const std::string& filename){ addSpriteFrameWithFile(filename);} diff --git a/cocos/2d/CCAnimationCache.h b/cocos/2d/CCAnimationCache.h index 1a8aba4c87..cf7a8ad9d0 100644 --- a/cocos/2d/CCAnimationCache.h +++ b/cocos/2d/CCAnimationCache.h @@ -49,6 +49,7 @@ It saves in a cache the animations. You should use this class if you want to sav Before v0.99.5, the recommend way was to save them on the Sprite. Since v0.99.5, you should use this class instead. @since v0.99.5 +@js cc.animationCache */ class CC_DLL AnimationCache : public Ref { @@ -62,10 +63,13 @@ public: * @lua NA */ ~AnimationCache(); - /** Returns the shared instance of the Animation cache */ + /** Returns the shared instance of the Animation cache + @js NA + */ static AnimationCache* getInstance(); /** Purges the cache. It releases all the Animation objects and the shared instance. + @js NA */ static void destroyInstance(); @@ -107,6 +111,7 @@ public: Make sure that the frames were previously loaded in the SpriteFrameCache. @param plist The path of the relative file,it use to find the plist path for load SpriteFrames. @since v1.1 + @js NA */ void addAnimationsWithDictionary(const ValueMap& dictionary,const std::string& plist); diff --git a/cocos/2d/CCAtlasNode.h b/cocos/2d/CCAtlasNode.h index 5162a69b18..55a35d4261 100644 --- a/cocos/2d/CCAtlasNode.h +++ b/cocos/2d/CCAtlasNode.h @@ -86,7 +86,6 @@ public: */ virtual void setBlendFunc(const BlendFunc& blendFunc) override; /** - * @js NA * @lua NA */ virtual const BlendFunc& getBlendFunc() const override; diff --git a/cocos/base/CCRef.h b/cocos/base/CCRef.h index f0f2820ed9..8ca2956c5b 100644 --- a/cocos/base/CCRef.h +++ b/cocos/base/CCRef.h @@ -40,7 +40,9 @@ NS_CC_BEGIN class Ref; -/** Interface that defines how to clone an Ref */ +/** Interface that defines how to clone an Ref +@js NA +*/ class CC_DLL Clonable { public: @@ -63,6 +65,9 @@ public: } }; +/** +@js NA +*/ class CC_DLL Ref { public: