mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3
This commit is contained in:
commit
657f270855
|
@ -2,7 +2,7 @@ cocos2d-x-3.5 Mar.23 2015
|
||||||
[NEW] EditBox: support Color4B
|
[NEW] EditBox: support Color4B
|
||||||
|
|
||||||
[FIX] AutoRelasePool: memory leak if adding an element into pool when releasing auto release pool
|
[FIX] AutoRelasePool: memory leak if adding an element into pool when releasing auto release pool
|
||||||
[FIX] FileUtils: getWritablePath() will not return corrent setted writable path on Mac & Windows
|
[FIX] FileUtils: getWritablePath() does not return corret setted writable path on Mac & Windows
|
||||||
[FIX] HttpAsynConnection: can not get error content if response code less than 200 or response code greater or equal than 300
|
[FIX] HttpAsynConnection: can not get error content if response code less than 200 or response code greater or equal than 300
|
||||||
|
|
||||||
cocos2d-x-3.5rc0 Mar.13 2015
|
cocos2d-x-3.5rc0 Mar.13 2015
|
||||||
|
@ -22,7 +22,7 @@ cocos2d-x-3.5rc0 Mar.13 2015
|
||||||
|
|
||||||
cocos2d-x-3.5beta0 Feb.27 2015
|
cocos2d-x-3.5beta0 Feb.27 2015
|
||||||
[NEW] Added Particle3D
|
[NEW] Added Particle3D
|
||||||
[NEW] C++: add Romanian languange support
|
[NEW] C++: add Romanian language support
|
||||||
|
|
||||||
[FIX] Audio: audio can not resume if it is interrupt, and back from background
|
[FIX] Audio: audio can not resume if it is interrupt, and back from background
|
||||||
[FIX] Cocos Studio UI: setCameraMask does not work for the Cocos Studio UI
|
[FIX] Cocos Studio UI: setCameraMask does not work for the Cocos Studio UI
|
||||||
|
|
|
@ -38,7 +38,7 @@ endif()
|
||||||
project (Cocos2d-X)
|
project (Cocos2d-X)
|
||||||
|
|
||||||
# The version number
|
# The version number
|
||||||
set(COCOS2D_X_VERSION 3.5beta0)
|
set(COCOS2D_X_VERSION 3.5)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
|
||||||
include(CocosBuildHelpers)
|
include(CocosBuildHelpers)
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Texture2D;
|
||||||
class SpriteFrame;
|
class SpriteFrame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup sprite_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ NS_CC_BEGIN
|
||||||
class Animation;
|
class Animation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup sprite_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ THE SOFTWARE.
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup base_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -174,14 +174,24 @@ public:
|
||||||
//override
|
//override
|
||||||
virtual void onEnter() override;
|
virtual void onEnter() override;
|
||||||
virtual void onExit() override;
|
virtual void onExit() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the visiting camera , the visiting camera shall be set on Scene::render
|
||||||
|
*/
|
||||||
static const Camera* getVisitingCamera() { return _visitingCamera; }
|
static const Camera* getVisitingCamera() { return _visitingCamera; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the default camera of the current running scene.
|
||||||
|
*/
|
||||||
static Camera* getDefaultCamera();
|
static Camera* getDefaultCamera();
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
Camera();
|
Camera();
|
||||||
~Camera();
|
~Camera();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the scene,this method shall not be invoke manually
|
||||||
|
*/
|
||||||
void setScene(Scene* scene);
|
void setScene(Scene* scene);
|
||||||
|
|
||||||
/**set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8*/
|
/**set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8*/
|
||||||
|
|
|
@ -34,51 +34,82 @@
|
||||||
#include "renderer/CCCustomCommand.h"
|
#include "renderer/CCCustomCommand.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
/**
|
||||||
|
* @addtogroup _2d
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/** ClippingNode is a subclass of Node.
|
/** ClippingNode is a subclass of Node.
|
||||||
It draws its content (childs) clipped using a stencil.
|
* It draws its content (childs) clipped using a stencil.
|
||||||
The stencil is an other Node that will not be drawn.
|
* The stencil is an other Node that will not be drawn.
|
||||||
The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold).
|
* The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold).
|
||||||
*/
|
*/
|
||||||
class CC_DLL ClippingNode : public Node
|
class CC_DLL ClippingNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Creates and initializes a clipping node without a stencil.
|
/** Creates and initializes a clipping node without a stencil.
|
||||||
|
*
|
||||||
|
* @return An autorelease ClippingNode.
|
||||||
*/
|
*/
|
||||||
static ClippingNode* create();
|
static ClippingNode* create();
|
||||||
|
|
||||||
/** Creates and initializes a clipping node with an other node as its stencil.
|
/** Creates and initializes a clipping node with an other node as its stencil.
|
||||||
The stencil node will be retained.
|
* The stencil node will be retained.
|
||||||
|
* @param stencil The stencil node.
|
||||||
*/
|
*/
|
||||||
static ClippingNode* create(Node *stencil);
|
static ClippingNode* create(Node *stencil);
|
||||||
|
|
||||||
/** The Node to use as a stencil to do the clipping.
|
/** The Node to use as a stencil to do the clipping.
|
||||||
The stencil node will be retained.
|
* The stencil node will be retained.
|
||||||
This default to nil.
|
* This default to nil.
|
||||||
|
*
|
||||||
|
* @return The stencil node.
|
||||||
*/
|
*/
|
||||||
Node* getStencil() const;
|
Node* getStencil() const;
|
||||||
|
|
||||||
|
/** Set the Node to use as a stencil to do the clipping.
|
||||||
|
*
|
||||||
|
* @param stencil The Node to use as a stencil to do the clipping.
|
||||||
|
*/
|
||||||
void setStencil(Node *stencil);
|
void setStencil(Node *stencil);
|
||||||
|
|
||||||
/** If stencil has no childre it will not be drawn.
|
/** If stencil has no childre it will not be drawn.
|
||||||
If you have custom stencil-based node with stencil drawing mechanics other then children-based,
|
* If you have custom stencil-based node with stencil drawing mechanics other then children-based,
|
||||||
then this method should return true every time you wish stencil to be visited.
|
* then this method should return true every time you wish stencil to be visited.
|
||||||
By default returns true if has any children attached.
|
* By default returns true if has any children attached.
|
||||||
*/
|
*
|
||||||
|
* @return If you have custom stencil-based node with stencil drawing mechanics other then children-based,
|
||||||
|
* then this method should return true every time you wish stencil to be visited.
|
||||||
|
* By default returns true if has any children attached.
|
||||||
|
*/
|
||||||
virtual bool hasContent() const;
|
virtual bool hasContent() const;
|
||||||
|
|
||||||
/** The alpha threshold.
|
/** The alpha threshold.
|
||||||
The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
|
* The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
|
||||||
Should be a float between 0 and 1.
|
* Should be a float between 0 and 1.
|
||||||
This default to 1 (so alpha test is disabled).
|
* This default to 1 (so alpha test is disabled).
|
||||||
|
*
|
||||||
|
* @return The alpha threshold value,Should be a float between 0 and 1.
|
||||||
*/
|
*/
|
||||||
GLfloat getAlphaThreshold() const;
|
GLfloat getAlphaThreshold() const;
|
||||||
|
|
||||||
|
/** Set the alpha threshold.
|
||||||
|
*
|
||||||
|
* @param alphaThreshold The alpha threshold.
|
||||||
|
*/
|
||||||
void setAlphaThreshold(GLfloat alphaThreshold);
|
void setAlphaThreshold(GLfloat alphaThreshold);
|
||||||
|
|
||||||
/** Inverted. If this is set to true,
|
/** Inverted. If this is set to true,
|
||||||
the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
|
* the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
|
||||||
This default to false.
|
* This default to false.
|
||||||
|
*
|
||||||
|
* @return If the clippingNode is Inverted, it will be return true.
|
||||||
*/
|
*/
|
||||||
bool isInverted() const;
|
bool isInverted() const;
|
||||||
|
|
||||||
|
/** Set the ClippingNode whether or not invert.
|
||||||
|
*
|
||||||
|
* @param inverted A bool Type,to set the ClippingNode whether or not invert.
|
||||||
|
*/
|
||||||
void setInverted(bool inverted);
|
void setInverted(bool inverted);
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
|
@ -162,7 +193,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ClippingNode);
|
CC_DISALLOW_COPY_AND_ASSIGN(ClippingNode);
|
||||||
};
|
};
|
||||||
|
/** @} */
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
#endif // __MISCNODE_CCCLIPPING_NODE_H__
|
#endif // __MISCNODE_CCCLIPPING_NODE_H__
|
||||||
|
|
|
@ -38,59 +38,202 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/** DrawNode
|
class PointArray;
|
||||||
Node that draws dots, segments and polygons.
|
/**
|
||||||
Faster than the "drawing primitives" since they draws everything in one single batch.
|
* @addtogroup _2d
|
||||||
|
* @{
|
||||||
@since v2.1
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PointArray;
|
/** @class DrawNode
|
||||||
|
* @brief Node that draws dots, segments and polygons.
|
||||||
|
* Faster than the "drawing primitives" since they draws everything in one single batch.
|
||||||
|
* @since v2.1
|
||||||
|
*/
|
||||||
class CC_DLL DrawNode : public Node
|
class CC_DLL DrawNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates and initialize a DrawNode node */
|
/** creates and initialize a DrawNode node.
|
||||||
|
*
|
||||||
|
* @return Return an autorelease object.
|
||||||
|
*/
|
||||||
static DrawNode* create();
|
static DrawNode* create();
|
||||||
|
|
||||||
|
/** Draw a point.
|
||||||
|
*
|
||||||
|
* @param point A Vec2 used to point.
|
||||||
|
* @param pointSize The point size.
|
||||||
|
* @param color The point color.
|
||||||
|
*/
|
||||||
void drawPoint(const Vec2& point, const float pointSize, const Color4F &color);
|
void drawPoint(const Vec2& point, const float pointSize, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draw a group point.
|
||||||
|
*
|
||||||
|
* @param position A Vec2 pointer.
|
||||||
|
* @param numberOfPoints The number of points.
|
||||||
|
* @param color The point color.
|
||||||
|
*/
|
||||||
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const Color4F &color);
|
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draw a group point.
|
||||||
|
*
|
||||||
|
* @param position A Vec2 pointer.
|
||||||
|
* @param numberOfPoints The number of points.
|
||||||
|
* @param pointSize The point size.
|
||||||
|
* @param color The point color.
|
||||||
|
*/
|
||||||
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color);
|
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draw an line from origin to destination with color.
|
||||||
|
*
|
||||||
|
* @param origin The line origin.
|
||||||
|
* @param destination The line destination.
|
||||||
|
* @param color The line color.
|
||||||
|
*/
|
||||||
void drawLine(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
void drawLine(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a rectangle given the origin and destination point measured in points.
|
||||||
|
* The origin and the destination can not have the same x and y coordinate.
|
||||||
|
*
|
||||||
|
* @param origin The rectangle origin.
|
||||||
|
* @param destination The rectangle destination.
|
||||||
|
* @param color The rectangle color.
|
||||||
|
*/
|
||||||
void drawRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
void drawRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a polygon given a pointer to point coordinates and the number of vertices measured in points.
|
||||||
|
* The polygon can be closed or open.
|
||||||
|
*
|
||||||
|
* @param poli A pointer to point coordinates.
|
||||||
|
* @param numberOfPoints The number of vertices measured in points.
|
||||||
|
* @param closePolygon The polygon can be closed or open.
|
||||||
|
* @param color The polygon color.
|
||||||
|
*/
|
||||||
void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon, const Color4F &color);
|
void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a circle given the center, radius and number of segments.
|
||||||
|
*
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param drawLineToCenter Whether or not draw the line from the origin to center.
|
||||||
|
* @param scaleX The scale value in x.
|
||||||
|
* @param scaleY The scale value in y.
|
||||||
|
* @param color Set the circle color.
|
||||||
|
*/
|
||||||
void drawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const Color4F &color);
|
void drawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a circle given the center, radius and number of segments.
|
||||||
|
*
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param drawLineToCenter Whether or not draw the line from the origin to center.
|
||||||
|
* @param color Set the circle color.
|
||||||
|
*/
|
||||||
void drawCircle(const Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, const Color4F &color);
|
void drawCircle(const Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a quad bezier path.
|
||||||
|
*
|
||||||
|
* @param origin The origin of the bezier path.
|
||||||
|
* @param control The control of the bezier path.
|
||||||
|
* @param destination The destination of the bezier path.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @param color Set the quad bezier color.
|
||||||
|
*/
|
||||||
void drawQuadBezier(const Vec2 &origin, const Vec2 &control, const Vec2 &destination, unsigned int segments, const Color4F &color);
|
void drawQuadBezier(const Vec2 &origin, const Vec2 &control, const Vec2 &destination, unsigned int segments, const Color4F &color);
|
||||||
|
|
||||||
/** draw a cubic bezier curve with color and number of segments */
|
/** Draw a cubic bezier curve with color and number of segments
|
||||||
|
*
|
||||||
|
* @param origin The origin of the bezier path.
|
||||||
|
* @param control1 The first control of the bezier path.
|
||||||
|
* @param control2 The second control of the bezier path.
|
||||||
|
* @param destination The destination of the bezier path.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @param color Set the cubic bezier color.
|
||||||
|
*/
|
||||||
void drawCubicBezier(const Vec2 &origin, const Vec2 &control1, const Vec2 &control2, const Vec2 &destination, unsigned int segments, const Color4F &color);
|
void drawCubicBezier(const Vec2 &origin, const Vec2 &control1, const Vec2 &control2, const Vec2 &destination, unsigned int segments, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a Cardinal Spline path.
|
||||||
|
*
|
||||||
|
* @param config A array point.
|
||||||
|
* @param tension The tension of the spline.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @param color Set the Spline color.
|
||||||
|
*/
|
||||||
void drawCardinalSpline(PointArray *config, float tension, unsigned int segments, const Color4F &color);
|
void drawCardinalSpline(PointArray *config, float tension, unsigned int segments, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a Catmull Rom path.
|
||||||
|
*
|
||||||
|
* @param points A point array of control point.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @param color The Catmull Rom color.
|
||||||
|
*/
|
||||||
void drawCatmullRom(PointArray *points, unsigned int segments, const Color4F &color);
|
void drawCatmullRom(PointArray *points, unsigned int segments, const Color4F &color);
|
||||||
|
|
||||||
/** draw a dot at a position, with a given radius and color */
|
/** draw a dot at a position, with a given radius and color.
|
||||||
|
*
|
||||||
|
* @param pos The dot center.
|
||||||
|
* @param radius The dot radius.
|
||||||
|
* @param color The dot color.
|
||||||
|
*/
|
||||||
void drawDot(const Vec2 &pos, float radius, const Color4F &color);
|
void drawDot(const Vec2 &pos, float radius, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a rectangle with 4 points.
|
||||||
|
*
|
||||||
|
* @param p1 The rectangle vertex point.
|
||||||
|
* @param p2 The rectangle vertex point.
|
||||||
|
* @param p3 The rectangle vertex point.
|
||||||
|
* @param p4 The rectangle vertex point.
|
||||||
|
* @param color The rectangle color.
|
||||||
|
*/
|
||||||
void drawRect(const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Vec2& p4, const Color4F &color);
|
void drawRect(const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Vec2& p4, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a solid rectangle given the origin and destination point measured in points.
|
||||||
|
* The origin and the destination can not have the same x and y coordinate.
|
||||||
|
*
|
||||||
|
* @param origin The rectangle origin.
|
||||||
|
* @param destination The rectangle destination.
|
||||||
|
* @param color The rectangle color.
|
||||||
|
*/
|
||||||
void drawSolidRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
void drawSolidRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
|
||||||
|
*
|
||||||
|
* @param poli A solid polygon given a pointer to CGPoint coordinates.
|
||||||
|
* @param numberOfPoints The number of vertices measured in points.
|
||||||
|
* @param color The solid polygon color.
|
||||||
|
*/
|
||||||
void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, const Color4F &color);
|
void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a solid circle given the center, radius and number of segments.
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param scaleX The scale value in x.
|
||||||
|
* @param scaleY The scale value in y.
|
||||||
|
* @param color The solid circle color.
|
||||||
|
*/
|
||||||
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const Color4F &color);
|
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const Color4F &color);
|
||||||
|
|
||||||
|
/** Draws a solid circle given the center, radius and number of segments.
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param color The solid circle color.
|
||||||
|
*/
|
||||||
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, const Color4F& color);
|
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, const Color4F& color);
|
||||||
|
|
||||||
/** draw a segment with a radius and color */
|
/** draw a segment with a radius and color.
|
||||||
|
*
|
||||||
|
* @param from The segment origin.
|
||||||
|
* @param to The segment destination.
|
||||||
|
* @param radius The segment radius.
|
||||||
|
* @param color The segment color.
|
||||||
|
*/
|
||||||
void drawSegment(const Vec2 &from, const Vec2 &to, float radius, const Color4F &color);
|
void drawSegment(const Vec2 &from, const Vec2 &to, float radius, const Color4F &color);
|
||||||
|
|
||||||
/** draw a polygon with a fill color and line color
|
/** draw a polygon with a fill color and line color
|
||||||
|
@ -99,23 +242,41 @@ public:
|
||||||
* In js: var drawPolygon(var Arrayofpoints, var fillColor, var width, var borderColor)
|
* In js: var drawPolygon(var Arrayofpoints, var fillColor, var width, var borderColor)
|
||||||
* In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor)
|
* In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor)
|
||||||
* @endcode
|
* @endcode
|
||||||
|
* @param verts A pointer to point coordinates.
|
||||||
|
* @param count The number of verts measured in points.
|
||||||
|
* @param fillColor The color will fill in polygon.
|
||||||
|
* @param borderWidth The border of line width.
|
||||||
|
* @param borderColor The border of line color.
|
||||||
*/
|
*/
|
||||||
void drawPolygon(const Vec2 *verts, int count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor);
|
void drawPolygon(const Vec2 *verts, int count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor);
|
||||||
|
|
||||||
/** draw a triangle with color */
|
/** draw a triangle with color.
|
||||||
|
*
|
||||||
|
* @param p1 The triangle vertex point.
|
||||||
|
* @param p2 The triangle vertex point.
|
||||||
|
* @param p3 The triangle vertex point.
|
||||||
|
* @param color The triangle color.
|
||||||
|
*/
|
||||||
void drawTriangle(const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Color4F &color);
|
void drawTriangle(const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Color4F &color);
|
||||||
|
|
||||||
/** draw a quadratic bezier curve with color and number of segments, use drawQuadBezier instead*/
|
/** draw a quadratic bezier curve with color and number of segments, use drawQuadBezier instead.
|
||||||
|
*
|
||||||
|
* @param from The origin of the bezier path.
|
||||||
|
* @param control The control of the bezier path.
|
||||||
|
* @param to The destination of the bezier path.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @param color The quadratic bezier color.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void drawQuadraticBezier(const Vec2& from, const Vec2& control, const Vec2& to, unsigned int segments, const Color4F &color);
|
CC_DEPRECATED_ATTRIBUTE void drawQuadraticBezier(const Vec2& from, const Vec2& control, const Vec2& to, unsigned int segments, const Color4F &color);
|
||||||
|
|
||||||
/** Clear the geometry in the node's buffer. */
|
/** Clear the geometry in the node's buffer. */
|
||||||
void clear();
|
void clear();
|
||||||
/**
|
/** Get the color mixed mode.
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
const BlendFunc& getBlendFunc() const;
|
const BlendFunc& getBlendFunc() const;
|
||||||
/**
|
/** Set the color mixed mode.
|
||||||
* @code
|
* @code
|
||||||
* When this function bound into js or lua,the parameter will be changed
|
* When this function bound into js or lua,the parameter will be changed
|
||||||
* In js: var setBlendFunc(var src, var dst)
|
* In js: var setBlendFunc(var src, var dst)
|
||||||
|
@ -174,7 +335,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(DrawNode);
|
CC_DISALLOW_COPY_AND_ASSIGN(DrawNode);
|
||||||
};
|
};
|
||||||
|
/** @} */
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
#endif // __CCDRAWNODES_CCDRAW_NODE_H__
|
#endif // __CCDRAWNODES_CCDRAW_NODE_H__
|
||||||
|
|
|
@ -70,7 +70,7 @@ THE SOFTWARE.
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup global
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -78,91 +78,181 @@ class PointArray;
|
||||||
|
|
||||||
namespace DrawPrimitives
|
namespace DrawPrimitives
|
||||||
{
|
{
|
||||||
/** Initializes the drawing primitives */
|
/** Initializes the drawing primitives. */
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL init();
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL init();
|
||||||
|
|
||||||
/** Frees allocated resources by the drawing primitives */
|
/** Frees allocated resources by the drawing primitives. */
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL free();
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL free();
|
||||||
|
|
||||||
/** draws a point given x and y coordinate measured in points */
|
/** Draws a point given x and y coordinate measured in points
|
||||||
|
*
|
||||||
|
* @param point A Vec2 with a point given x and y coordinate.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoint(const Vec2& point);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoint(const Vec2& point);
|
||||||
|
|
||||||
/** draws an array of points.
|
/** Draws an array of points.
|
||||||
@since v0.7.2
|
*
|
||||||
|
* @param point A point coordinates.
|
||||||
|
* @param numberOfPoints The number of points.
|
||||||
|
* @since v0.7.2
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoints(const Vec2 *points, unsigned int numberOfPoints);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoints(const Vec2 *points, unsigned int numberOfPoints);
|
||||||
|
|
||||||
/** draws a line given the origin and destination point measured in points */
|
/** Draws a line given the origin and destination point measured in points
|
||||||
|
*
|
||||||
|
* @param origin A Vec2 Type point used to the line origin.
|
||||||
|
* @param destination A Vec2 Type point used to the line destination.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawLine(const Vec2& origin, const Vec2& destination);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawLine(const Vec2& origin, const Vec2& destination);
|
||||||
|
|
||||||
/** draws a rectangle given the origin and destination point measured in points. */
|
/** Draws a rectangle given the origin and destination point measured in points.
|
||||||
|
* The origin and the destination can not have the same x and y coordinate.
|
||||||
|
*
|
||||||
|
* @param origin The rectangle origin.
|
||||||
|
* @param destination The rectangle destination.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawRect(Vec2 origin, Vec2 destination);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawRect(Vec2 origin, Vec2 destination);
|
||||||
|
|
||||||
/** draws a solid rectangle given the origin and destination point measured in points.
|
/** Draws a solid rectangle given the origin and destination point measured in points.
|
||||||
@since 1.1
|
* The origin and the destination can not have the same x and y coordinate.
|
||||||
|
*
|
||||||
|
* @param origin The rectangle origin.
|
||||||
|
* @param destination The rectangle destination.
|
||||||
|
* @param color The rectangle color.
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidRect(Vec2 origin, Vec2 destination, Color4F color);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidRect(Vec2 origin, Vec2 destination, Color4F color);
|
||||||
|
|
||||||
/** draws a polygon given a pointer to point coordinates and the number of vertices measured in points.
|
/** Draws a polygon given a pointer to point coordinates and the number of vertices measured in points.
|
||||||
The polygon can be closed or open
|
* The polygon can be closed or open.
|
||||||
*/
|
*
|
||||||
|
* @param vertices A pointer to point coordinates.
|
||||||
|
* @param numOfVertices The number of vertices measured in points.
|
||||||
|
* @param closePolygon The polygon can be closed or open.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoly(const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawPoly(const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon);
|
||||||
|
|
||||||
/** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
|
/** Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
|
||||||
|
*
|
||||||
|
* @param poli A solid polygon given a pointer to CGPoint coordinates.
|
||||||
|
* @param numberOfPoints The number of vertices measured in points.
|
||||||
|
* @param color The solid polygon color.
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color);
|
||||||
|
|
||||||
/** draws a circle given the center, radius and number of segments. */
|
/** Draws a circle given the center, radius and number of segments.
|
||||||
|
*
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param drawLineToCenter Whether or not draw the line from the origin to center.
|
||||||
|
* @param scaleX The scale value in x.
|
||||||
|
* @param scaleY The scale value in y.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY);
|
||||||
|
|
||||||
|
/** Draws a circle given the center, radius and number of segments.
|
||||||
|
*
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param drawLineToCenter Whether or not draw the line from the origin to center.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter);
|
||||||
|
|
||||||
/** draws a solid circle given the center, radius and number of segments. */
|
/** Draws a solid circle given the center, radius and number of segments.
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
* @param scaleX The scale value in x.
|
||||||
|
* @param scaleY The scale value in y.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY);
|
||||||
|
|
||||||
|
/** Draws a solid circle given the center, radius and number of segments.
|
||||||
|
* @param center The circle center point.
|
||||||
|
* @param radius The circle rotate of radius.
|
||||||
|
* @param angle The circle angel.
|
||||||
|
* @param segments The number of segments.
|
||||||
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments);
|
||||||
|
|
||||||
/** draws a quad bezier path
|
/** Draws a quad bezier path.
|
||||||
@warning This function could be pretty slow. Use it only for debugging purposes.
|
*
|
||||||
@since v0.8
|
* @param origin The origin of the bezier path.
|
||||||
|
* @param control The control of the bezier path.
|
||||||
|
* @param destination The destination of the bezier path.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @warning This function could be pretty slow. Use it only for debugging purposes.
|
||||||
|
* @since v0.8
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments);
|
||||||
|
|
||||||
/** draws a cubic bezier path
|
/** Draws a cubic bezier path.
|
||||||
@warning This function could be pretty slow. Use it only for debugging purposes.
|
*
|
||||||
@since v0.8
|
* @param origin The origin of the bezier path.
|
||||||
|
* @param control1 The first control of the bezier path.
|
||||||
|
* @param control2 The second control of the bezier path.
|
||||||
|
* @param destination The destination of the bezier path.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @warning This function could be pretty slow. Use it only for debugging purposes.
|
||||||
|
* @since v0.8
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments);
|
||||||
|
|
||||||
/** draws a Catmull Rom path.
|
/** Draws a Catmull Rom path.
|
||||||
@warning This function could be pretty slow. Use it only for debugging purposes.
|
*
|
||||||
@since v2.0
|
* @param arrayOfControlPoints A point array of control point.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @warning This function could be pretty slow. Use it only for debugging purposes.
|
||||||
|
* @since v2.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCatmullRom(PointArray *arrayOfControlPoints, unsigned int segments);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCatmullRom(PointArray *arrayOfControlPoints, unsigned int segments);
|
||||||
|
|
||||||
/** draws a Cardinal Spline path.
|
/** Draws a Cardinal Spline path.
|
||||||
@warning This function could be pretty slow. Use it only for debugging purposes.
|
*
|
||||||
@since v2.0
|
* @param config A array point.
|
||||||
|
* @param tension The tension of the spline.
|
||||||
|
* @param segments The The number of segments.
|
||||||
|
* @warning This function could be pretty slow. Use it only for debugging purposes.
|
||||||
|
* @since v2.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCardinalSpline(PointArray *config, float tension, unsigned int segments);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawCardinalSpline(PointArray *config, float tension, unsigned int segments);
|
||||||
|
|
||||||
/** set the drawing color with 4 unsigned bytes
|
/** Set the drawing color with 4 unsigned bytes.
|
||||||
@since v2.0
|
*
|
||||||
|
* @param r The red color with a unsigned bytes.
|
||||||
|
* @param g The green color with a unsigned bytes.
|
||||||
|
* @param b The blue color with a unsigned bytes.
|
||||||
|
* @param a Alpha with a unsigned bytes.
|
||||||
|
* @since v2.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
|
||||||
|
|
||||||
/** set the drawing color with 4 floats
|
/** Set the drawing color with 4 floats.
|
||||||
@since v2.0
|
*
|
||||||
|
* @param r The red color with an floats.
|
||||||
|
* @param g The green color with an floats.
|
||||||
|
* @param b The blue color with an floats.
|
||||||
|
* @param a Alpha with an floats.
|
||||||
|
* @since v2.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
|
||||||
|
|
||||||
/** set the point size in points. Default 1.
|
/** Set the point size in points. Default 1.
|
||||||
@since v2.0
|
*
|
||||||
|
* @param pointSize The point size with an float.
|
||||||
|
* @since v2.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL setPointSize(GLfloat pointSize);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL setPointSize(GLfloat pointSize);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of global group
|
// end of global group
|
||||||
/// @}
|
/** @} */
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
|
|
@ -46,40 +46,45 @@ struct _ccCArray;
|
||||||
namespace experimental{
|
namespace experimental{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup tilemap_parallax_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief FastTMXLayer represents the TMX layer.
|
/** @brief FastTMXLayer represents the TMX layer.
|
||||||
|
|
||||||
It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas.
|
* It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas.
|
||||||
If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created.
|
* If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created.
|
||||||
The benefits of using Sprite objects as tiles are:
|
* The benefits of using Sprite objects as tiles are:
|
||||||
- tiles (Sprite) can be rotated/scaled/moved with a nice API
|
* - tiles (Sprite) can be rotated/scaled/moved with a nice API.
|
||||||
|
|
||||||
If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative),
|
* If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative),
|
||||||
then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth.
|
* then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth.
|
||||||
|
|
||||||
On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value.
|
* On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value.
|
||||||
Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be:
|
* Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be:
|
||||||
|
|
||||||
glAlphaFunc( GL_GREATER, value )
|
* glAlphaFunc( GL_GREATER, value ).
|
||||||
|
|
||||||
"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer.
|
* "value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer.
|
||||||
The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different
|
* The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different
|
||||||
value, like 0.5.
|
* value, like 0.5.
|
||||||
|
|
||||||
For further information, please see the programming guide:
|
* For further information, please see the programming guide:
|
||||||
|
* http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
|
||||||
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
|
|
||||||
|
* @since v3.2
|
||||||
@since v3.2
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
class CC_DLL TMXLayer : public Node
|
class CC_DLL TMXLayer : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates a FastTMXLayer with an tileset info, a layer info and a map info */
|
/** Creates a FastTMXLayer with an tileset info, a layer info and a map info.
|
||||||
|
*
|
||||||
|
* @param tilesetInfo An tileset info.
|
||||||
|
* @param layerInfo A layer info.
|
||||||
|
* @param mapInfo A map info.
|
||||||
|
* @return Reruen an autorelease object.
|
||||||
|
*/
|
||||||
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||||
/**
|
/**
|
||||||
* @js ctor
|
* @js ctor
|
||||||
|
@ -91,83 +96,170 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~TMXLayer();
|
virtual ~TMXLayer();
|
||||||
|
|
||||||
/** returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
/** Returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
* @param flags A TMXTileFlags.
|
||||||
|
* @return The tile gid at a given tile coordinate. It also returns the tile flags.
|
||||||
*/
|
*/
|
||||||
int getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
|
int getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
|
||||||
|
|
||||||
/** sets the tile gid (gid = tile global id) at a given tile coordinate.
|
/** Sets the tile gid (gid = tile global id) at a given tile coordinate.
|
||||||
The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
* The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
||||||
If a tile is already placed at that position, then it will be removed.
|
* If a tile is already placed at that position, then it will be removed.
|
||||||
*/
|
* @param gid The gid value.
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
*/
|
||||||
void setTileGID(int gid, const Vec2& tileCoordinate);
|
void setTileGID(int gid, const Vec2& tileCoordinate);
|
||||||
|
|
||||||
/** sets the tile gid (gid = tile global id) at a given tile coordinate.
|
/** Sets the tile gid (gid = tile global id) at a given tile coordinate.
|
||||||
The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
* The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
||||||
If a tile is already placed at that position, then it will be removed.
|
* If a tile is already placed at that position, then it will be removed.
|
||||||
|
* Use withFlags if the tile flags need to be changed as well.
|
||||||
Use withFlags if the tile flags need to be changed as well
|
*
|
||||||
|
* @param gid A integer value,it will be sets the tile gid.
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
* @param flags A TMXTileFlags.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags);
|
void setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags);
|
||||||
|
|
||||||
/** removes a tile at given tile coordinate */
|
/** Removes a tile at given tile coordinate.
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile Coordinate.
|
||||||
|
*/
|
||||||
void removeTileAt(const Vec2& tileCoordinate);
|
void removeTileAt(const Vec2& tileCoordinate);
|
||||||
|
|
||||||
/** returns the position in points of a given tile coordinate */
|
/** Returns the position in points of a given tile coordinate.
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile Coordinate.
|
||||||
|
* @return The position in points of a given tile coordinate.
|
||||||
|
*/
|
||||||
Vec2 getPositionAt(const Vec2& tileCoordinate);
|
Vec2 getPositionAt(const Vec2& tileCoordinate);
|
||||||
|
|
||||||
/** return the value for the specific property name */
|
/** Return the value for the specific property name.
|
||||||
|
*
|
||||||
|
* @param propertyName The value for the specific property name.
|
||||||
|
* @return The value for the specific property name.
|
||||||
|
*/
|
||||||
Value getProperty(const std::string& propertyName) const;
|
Value getProperty(const std::string& propertyName) const;
|
||||||
|
|
||||||
/** Creates the tiles */
|
/** Creates the tiles. */
|
||||||
void setupTiles();
|
void setupTiles();
|
||||||
|
|
||||||
|
/** Get the tile layer name.
|
||||||
|
*
|
||||||
|
* @return The tile layer name.
|
||||||
|
*/
|
||||||
inline const std::string& getLayerName(){ return _layerName; }
|
inline const std::string& getLayerName(){ return _layerName; }
|
||||||
|
|
||||||
|
/** Set the tile layer name.
|
||||||
|
*
|
||||||
|
* @param layerName The new layer name.
|
||||||
|
*/
|
||||||
inline void setLayerName(const std::string& layerName){ _layerName = layerName; }
|
inline void setLayerName(const std::string& layerName){ _layerName = layerName; }
|
||||||
|
|
||||||
/** size of the layer in tiles */
|
/** Size of the layer in tiles.
|
||||||
|
*
|
||||||
|
* @return Size of the layer in tiles.
|
||||||
|
*/
|
||||||
inline const Size& getLayerSize() const { return _layerSize; };
|
inline const Size& getLayerSize() const { return _layerSize; };
|
||||||
|
|
||||||
|
/** Set the size of the layer in tiles.
|
||||||
|
*
|
||||||
|
* @param size The new size of the layer in tiles.
|
||||||
|
*/
|
||||||
inline void setLayerSize(const Size& size) { _layerSize = size; };
|
inline void setLayerSize(const Size& size) { _layerSize = size; };
|
||||||
|
|
||||||
/** size of the map's tile (could be different from the tile's size) */
|
/** Size of the map's tile (could be different from the tile's size).
|
||||||
|
*
|
||||||
|
* @return Size of the map's tile (could be different from the tile's size).
|
||||||
|
*/
|
||||||
inline const Size& getMapTileSize() const { return _mapTileSize; };
|
inline const Size& getMapTileSize() const { return _mapTileSize; };
|
||||||
|
|
||||||
|
/** Set the size of the map's tile.
|
||||||
|
*
|
||||||
|
* @param size The new size of the map's tile.
|
||||||
|
*/
|
||||||
inline void setMapTileSize(const Size& size) { _mapTileSize = size; };
|
inline void setMapTileSize(const Size& size) { _mapTileSize = size; };
|
||||||
|
|
||||||
/** pointer to the map of tiles
|
/** Pointer to the map of tiles.
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
* @return The pointer to the map of tiles.
|
||||||
*/
|
*/
|
||||||
const uint32_t* getTiles() const { return _tiles; };
|
const uint32_t* getTiles() const { return _tiles; };
|
||||||
|
|
||||||
|
/** Set the pointer to the map of tiles.
|
||||||
|
*
|
||||||
|
* @param tiles The pointer to the map of tiles.
|
||||||
|
*/
|
||||||
void setTiles(uint32_t* tiles) { _tiles = tiles; _quadsDirty = true;};
|
void setTiles(uint32_t* tiles) { _tiles = tiles; _quadsDirty = true;};
|
||||||
|
|
||||||
/** Tileset information for the layer */
|
/** Tileset information for the layer.
|
||||||
|
*
|
||||||
|
* @return Tileset information for the layer.
|
||||||
|
*/
|
||||||
inline TMXTilesetInfo* getTileSet() const { return _tileSet; };
|
inline TMXTilesetInfo* getTileSet() const { return _tileSet; };
|
||||||
|
|
||||||
|
/** Set the tileset information for the layer.
|
||||||
|
*
|
||||||
|
* @param info The new tileset information for the layer.
|
||||||
|
*/
|
||||||
inline void setTileSet(TMXTilesetInfo* info) {
|
inline void setTileSet(TMXTilesetInfo* info) {
|
||||||
CC_SAFE_RETAIN(info);
|
CC_SAFE_RETAIN(info);
|
||||||
CC_SAFE_RELEASE(_tileSet);
|
CC_SAFE_RELEASE(_tileSet);
|
||||||
_tileSet = info;
|
_tileSet = info;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Layer orientation, which is the same as the map orientation */
|
/** Layer orientation, which is the same as the map orientation.
|
||||||
|
*
|
||||||
|
* @return Layer orientation, which is the same as the map orientation.
|
||||||
|
*/
|
||||||
inline int getLayerOrientation() const { return _layerOrientation; };
|
inline int getLayerOrientation() const { return _layerOrientation; };
|
||||||
|
|
||||||
|
/** Set Layer orientation, which is the same as the map orientation.
|
||||||
|
*
|
||||||
|
* @param orientation Layer orientation, which is the same as the map orientation.
|
||||||
|
*/
|
||||||
inline void setLayerOrientation(int orientation) { _layerOrientation = orientation; };
|
inline void setLayerOrientation(int orientation) { _layerOrientation = orientation; };
|
||||||
|
|
||||||
/** properties from the layer. They can be added using Tiled */
|
/** Properties from the layer. They can be added using Tiled.
|
||||||
|
*
|
||||||
|
* @return Properties from the layer. They can be added using Tiled.
|
||||||
|
*/
|
||||||
inline const ValueMap& getProperties() const { return _properties; };
|
inline const ValueMap& getProperties() const { return _properties; };
|
||||||
|
|
||||||
|
/** Properties from the layer. They can be added using Tiled.
|
||||||
|
*
|
||||||
|
* @return Properties from the layer. They can be added using Tiled.
|
||||||
|
*/
|
||||||
inline ValueMap& getProperties() { return _properties; };
|
inline ValueMap& getProperties() { return _properties; };
|
||||||
|
|
||||||
|
/** Set the properties to the layer.
|
||||||
|
*
|
||||||
|
* @param properties The properties to the layer.
|
||||||
|
*/
|
||||||
inline void setProperties(const ValueMap& properties)
|
inline void setProperties(const ValueMap& properties)
|
||||||
{
|
{
|
||||||
_properties = properties;
|
_properties = properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** returns the tile (Sprite) at a given a tile coordinate.
|
/** Returns the tile (Sprite) at a given a tile coordinate.
|
||||||
The returned Sprite will be already added to the TMXLayer. Don't add it again.
|
* The returned Sprite will be already added to the TMXLayer. Don't add it again.
|
||||||
The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
|
* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
|
||||||
You can remove either by calling:
|
* You can remove either by calling:
|
||||||
- layer->removeChild(sprite, cleanup);
|
* - layer->removeChild(sprite, cleanup);
|
||||||
|
*
|
||||||
|
* @return Returns the tile (Sprite) at a given a tile coordinate.
|
||||||
*/
|
*/
|
||||||
Sprite* getTileAt(const Vec2& tileCoordinate);
|
Sprite* getTileAt(const Vec2& tileCoordinate);
|
||||||
|
|
||||||
|
/** Set an sprite to the tile,with the tile coordinate and gid.
|
||||||
|
*
|
||||||
|
* @param sprite A Sprite.
|
||||||
|
* @param pos The tile coordinate.
|
||||||
|
* @param gid The tile gid.
|
||||||
|
*/
|
||||||
void setupTileSprite(Sprite* sprite, Vec2 pos, int gid);
|
void setupTileSprite(Sprite* sprite, Vec2 pos, int gid);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -39,100 +39,164 @@ class TMXMapInfo;
|
||||||
namespace experimental {
|
namespace experimental {
|
||||||
|
|
||||||
class TMXLayer;
|
class TMXLayer;
|
||||||
|
/**
|
||||||
|
* @addtogroup _2d
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** @brief FastTMXTiledMap knows how to parse and render a TMX map.
|
/** @brief FastTMXTiledMap knows how to parse and render a TMX map.
|
||||||
|
|
||||||
It adds support for the TMX tiled map format used by http://www.mapeditor.org
|
* It adds support for the TMX tiled map format used by http://www.mapeditor.org.
|
||||||
It supports isometric, hexagonal and orthogonal tiles.
|
* It supports isometric, hexagonal and orthogonal tiles.
|
||||||
It also supports object groups, objects, and properties.
|
* It also supports object groups, objects, and properties.
|
||||||
|
|
||||||
Features:
|
* Features:
|
||||||
- Each tile will be treated as an Sprite
|
* - Each tile will be treated as an Sprite.
|
||||||
- The sprites are created on demand. They will be created only when you call "layer->tileAt(position)"
|
* - The sprites are created on demand. They will be created only when you call "layer->tileAt(position)".
|
||||||
- Each tile can be rotated / moved / scaled / tinted / "opaqued", since each tile is a Sprite
|
* - Each tile can be rotated / moved / scaled / tinted / "opaqued", since each tile is a Sprite.
|
||||||
- Tiles can be added/removed in runtime
|
* - Tiles can be added/removed in runtime.
|
||||||
- The z-order of the tiles can be modified in runtime
|
* - The z-order of the tiles can be modified in runtime.
|
||||||
- Each tile has an anchorPoint of (0,0)
|
* - Each tile has an anchorPoint of (0,0).
|
||||||
- The anchorPoint of the TMXTileMap is (0,0)
|
* - The anchorPoint of the TMXTileMap is (0,0).
|
||||||
- The TMX layers will be added as a child
|
* - The TMX layers will be added as a child.
|
||||||
- The TMX layers will be aliased by default
|
* - The TMX layers will be aliased by default.
|
||||||
- The tileset image will be loaded using the TextureCache
|
* - The tileset image will be loaded using the TextureCache.
|
||||||
- Each tile will have a unique tag
|
* - Each tile will have a unique tag.
|
||||||
- Each tile will have a unique z value. top-left: z=1, bottom-right: z=max z
|
* - Each tile will have a unique z value. top-left: z=1, bottom-right: z=max z.
|
||||||
- Each object group will be treated as an MutableArray
|
* - Each object group will be treated as an MutableArray.
|
||||||
- Object class which will contain all the properties in a dictionary
|
* - Object class which will contain all the properties in a dictionary.
|
||||||
- Properties can be assigned to the Map, Layer, Object Group, and Object
|
* - Properties can be assigned to the Map, Layer, Object Group, and Object.
|
||||||
|
|
||||||
Limitations:
|
* Limitations:
|
||||||
- It only supports one tileset per layer.
|
* - It only supports one tileset per layer.
|
||||||
- Embedded images are not supported
|
* - Embedded images are not supported.
|
||||||
- It only supports the XML format (the JSON format is not supported)
|
* - It only supports the XML format (the JSON format is not supported).
|
||||||
|
|
||||||
Technical description:
|
* Technical description:
|
||||||
Each layer is created using an FastTMXLayer (subclass of SpriteBatchNode). If you have 5 layers, then 5 FastTMXLayer will be created,
|
* Each layer is created using an FastTMXLayer (subclass of SpriteBatchNode). If you have 5 layers, then 5 FastTMXLayer will be created,
|
||||||
unless the layer visibility is off. In that case, the layer won't be created at all.
|
* unless the layer visibility is off. In that case, the layer won't be created at all.
|
||||||
You can obtain the layers (FastTMXLayer objects) at runtime by:
|
* You can obtain the layers (FastTMXLayer objects) at runtime by:
|
||||||
- map->getChildByTag(tag_number); // 0=1st layer, 1=2nd layer, 2=3rd layer, etc...
|
* - map->getChildByTag(tag_number); // 0=1st layer, 1=2nd layer, 2=3rd layer, etc...
|
||||||
- map->getLayer(name_of_the_layer);
|
* - map->getLayer(name_of_the_layer);
|
||||||
|
|
||||||
Each object group is created using a TMXObjectGroup which is a subclass of MutableArray.
|
* Each object group is created using a TMXObjectGroup which is a subclass of MutableArray.
|
||||||
You can obtain the object groups at runtime by:
|
* You can obtain the object groups at runtime by:
|
||||||
- map->getObjectGroup(name_of_the_object_group);
|
* - map->getObjectGroup(name_of_the_object_group);
|
||||||
|
|
||||||
Each object is a TMXObject.
|
* Each object is a TMXObject.
|
||||||
|
|
||||||
Each property is stored as a key-value pair in an MutableDictionary.
|
* Each property is stored as a key-value pair in an MutableDictionary.
|
||||||
You can obtain the properties at runtime by:
|
* You can obtain the properties at runtime by:
|
||||||
|
|
||||||
map->getProperty(name_of_the_property);
|
* map->getProperty(name_of_the_property);
|
||||||
layer->getProperty(name_of_the_property);
|
* layer->getProperty(name_of_the_property);
|
||||||
objectGroup->getProperty(name_of_the_property);
|
* objectGroup->getProperty(name_of_the_property);
|
||||||
object->getProperty(name_of_the_property);
|
* object->getProperty(name_of_the_property);
|
||||||
|
|
||||||
@since v3.2
|
* @since v3.2
|
||||||
*/
|
*/
|
||||||
class CC_DLL TMXTiledMap : public Node
|
class CC_DLL TMXTiledMap : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates a TMX Tiled Map with a TMX file.*/
|
/** Creates a TMX Tiled Map with a TMX file.
|
||||||
|
*
|
||||||
|
* @return An autorelease object.
|
||||||
|
*/
|
||||||
static TMXTiledMap* create(const std::string& tmxFile);
|
static TMXTiledMap* create(const std::string& tmxFile);
|
||||||
|
|
||||||
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */
|
/** Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources.
|
||||||
|
*
|
||||||
|
* @param tmxString A TMX formatted XML string.
|
||||||
|
* @param resourcePath A path to TMX resources.
|
||||||
|
* @return An autorelease object.
|
||||||
|
*/
|
||||||
static TMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
|
static TMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
|
||||||
|
|
||||||
/** return the FastTMXLayer for the specific layer */
|
/** Return the FastTMXLayer for the specific layer.
|
||||||
|
*
|
||||||
|
* @return Return the FastTMXLayer for the specific layer.
|
||||||
|
*/
|
||||||
TMXLayer* getLayer(const std::string& layerName) const;
|
TMXLayer* getLayer(const std::string& layerName) const;
|
||||||
|
|
||||||
/** return the TMXObjectGroup for the specific group */
|
/** Return the TMXObjectGroup for the specific group.
|
||||||
|
*
|
||||||
|
* @return Return the TMXObjectGroup for the specific group.
|
||||||
|
*/
|
||||||
TMXObjectGroup* getObjectGroup(const std::string& groupName) const;
|
TMXObjectGroup* getObjectGroup(const std::string& groupName) const;
|
||||||
|
|
||||||
/** return the value for the specific property name */
|
/** Return the value for the specific property name.
|
||||||
|
*
|
||||||
|
* @return Return the value for the specific property name.
|
||||||
|
*/
|
||||||
Value getProperty(const std::string& propertyName) const;
|
Value getProperty(const std::string& propertyName) const;
|
||||||
|
|
||||||
/** return properties dictionary for tile GID */
|
/** Return properties dictionary for tile GID.
|
||||||
|
*
|
||||||
|
* @return Return properties dictionary for tile GID.
|
||||||
|
*/
|
||||||
Value getPropertiesForGID(int GID) const;
|
Value getPropertiesForGID(int GID) const;
|
||||||
|
|
||||||
/** the map's size property measured in tiles */
|
/** The map's size property measured in tiles.
|
||||||
|
*
|
||||||
|
* @return The map's size property measured in tiles.
|
||||||
|
*/
|
||||||
inline const Size& getMapSize() const { return _mapSize; };
|
inline const Size& getMapSize() const { return _mapSize; };
|
||||||
|
|
||||||
|
/** Set the map's size property measured in tiles.
|
||||||
|
*
|
||||||
|
* @param mapSize The map's size property measured in tiles.
|
||||||
|
*/
|
||||||
inline void setMapSize(const Size& mapSize) { _mapSize = mapSize; };
|
inline void setMapSize(const Size& mapSize) { _mapSize = mapSize; };
|
||||||
|
|
||||||
/** the tiles's size property measured in pixels */
|
/** The tiles's size property measured in pixels.
|
||||||
|
*
|
||||||
|
* @return The tiles's size property measured in pixels.
|
||||||
|
*/
|
||||||
inline const Size& getTileSize() const { return _tileSize; };
|
inline const Size& getTileSize() const { return _tileSize; };
|
||||||
|
|
||||||
|
/** Set the tiles's size property measured in pixels.
|
||||||
|
*
|
||||||
|
* @param tileSize The tiles's size property measured in pixels.
|
||||||
|
*/
|
||||||
inline void setTileSize(const Size& tileSize) { _tileSize = tileSize; };
|
inline void setTileSize(const Size& tileSize) { _tileSize = tileSize; };
|
||||||
|
|
||||||
/** map orientation */
|
/** Get map orientation.
|
||||||
|
*
|
||||||
|
* @return The map orientation.
|
||||||
|
*/
|
||||||
inline int getMapOrientation() const { return _mapOrientation; };
|
inline int getMapOrientation() const { return _mapOrientation; };
|
||||||
|
|
||||||
|
/** Set map orientation.
|
||||||
|
*
|
||||||
|
* @param mapOrientation The map orientation.
|
||||||
|
*/
|
||||||
inline void setMapOrientation(int mapOrientation) { _mapOrientation = mapOrientation; };
|
inline void setMapOrientation(int mapOrientation) { _mapOrientation = mapOrientation; };
|
||||||
|
|
||||||
/** object groups */
|
/** Get object groups.
|
||||||
|
*
|
||||||
|
* @return Object groups.
|
||||||
|
*/
|
||||||
inline const Vector<TMXObjectGroup*>& getObjectGroups() const { return _objectGroups; };
|
inline const Vector<TMXObjectGroup*>& getObjectGroups() const { return _objectGroups; };
|
||||||
inline Vector<TMXObjectGroup*>& getObjectGroups() { return _objectGroups; };
|
inline Vector<TMXObjectGroup*>& getObjectGroups() { return _objectGroups; };
|
||||||
|
|
||||||
|
/** Set object groups.
|
||||||
|
*
|
||||||
|
* @param groups An object groups.
|
||||||
|
*/
|
||||||
inline void setObjectGroups(const Vector<TMXObjectGroup*>& groups) {
|
inline void setObjectGroups(const Vector<TMXObjectGroup*>& groups) {
|
||||||
_objectGroups = groups;
|
_objectGroups = groups;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** properties */
|
/** Get properties.
|
||||||
|
*
|
||||||
|
* @return Properties.
|
||||||
|
*/
|
||||||
inline const ValueMap& getProperties() const { return _properties; };
|
inline const ValueMap& getProperties() const { return _properties; };
|
||||||
|
|
||||||
|
/** Set properties.
|
||||||
|
*
|
||||||
|
* @param properties An ValueMap Properties.
|
||||||
|
*/
|
||||||
inline void setProperties(const ValueMap& properties) {
|
inline void setProperties(const ValueMap& properties) {
|
||||||
_properties = properties;
|
_properties = properties;
|
||||||
};
|
};
|
||||||
|
@ -180,7 +244,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of tilemap_parallax_nodes group
|
// end of tilemap_parallax_nodes group
|
||||||
/// @}
|
/** @} */
|
||||||
|
|
||||||
} //end of namespace experimental
|
} //end of namespace experimental
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,10 @@ class CC_DLL BaseLight : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//get light type
|
/**
|
||||||
|
* Get the light type,light type MUST be one of LightType::DIRECTIONAL ,
|
||||||
|
* LightType::POINT, LightType::SPOT, LightType::AMBIENT.
|
||||||
|
*/
|
||||||
virtual LightType getLightType() const = 0;
|
virtual LightType getLightType() const = 0;
|
||||||
|
|
||||||
/** intensity getter and setter */
|
/** intensity getter and setter */
|
||||||
|
|
|
@ -39,29 +39,64 @@ class Texture2D;
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** MotionStreak.
|
/** @class MotionStreak.
|
||||||
Creates a trailing path.
|
* @brief Creates a trailing path.
|
||||||
*/
|
*/
|
||||||
class CC_DLL MotionStreak : public Node, public TextureProtocol
|
class CC_DLL MotionStreak : public Node, public TextureProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */
|
/** Creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename.
|
||||||
|
*
|
||||||
|
* @param fade The fade time, in seconds.
|
||||||
|
* @param minSeg The minimum segments.
|
||||||
|
* @param stroke The width of stroke.
|
||||||
|
* @param color The color of stroke.
|
||||||
|
* @param path The texture file name of stoke.
|
||||||
|
* @return An autoreleased MotionStreak object.
|
||||||
|
*/
|
||||||
static MotionStreak* create(float fade, float minSeg, float stroke, const Color3B& color, const std::string& path);
|
static MotionStreak* create(float fade, float minSeg, float stroke, const Color3B& color, const std::string& path);
|
||||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture */
|
/** Creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture.
|
||||||
|
*
|
||||||
|
* @param fade The fade time, in seconds.
|
||||||
|
* @param minSeg The minimum segments.
|
||||||
|
* @param stroke The width of stroke.
|
||||||
|
* @param color The color of stroke.
|
||||||
|
* @param texture The texture name of stoke.
|
||||||
|
* @return An autoreleased MotionStreak object.
|
||||||
|
*/
|
||||||
static MotionStreak* create(float fade, float minSeg, float stroke, const Color3B& color, Texture2D* texture);
|
static MotionStreak* create(float fade, float minSeg, float stroke, const Color3B& color, Texture2D* texture);
|
||||||
|
|
||||||
/** color used for the tint */
|
/** Color used for the tint.
|
||||||
|
*
|
||||||
|
* @param colors The color used for the tint.
|
||||||
|
*/
|
||||||
void tintWithColor(const Color3B& colors);
|
void tintWithColor(const Color3B& colors);
|
||||||
|
|
||||||
/** Remove all living segments of the ribbon */
|
/** Remove all living segments of the ribbon.
|
||||||
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
/** When fast mode is enabled, new points are added faster but with lower precision */
|
/** When fast mode is enabled, new points are added faster but with lower precision.
|
||||||
|
*
|
||||||
|
* @return True if fast mode is enabled.
|
||||||
|
*/
|
||||||
inline bool isFastMode() const { return _fastMode; }
|
inline bool isFastMode() const { return _fastMode; }
|
||||||
|
/** Sets fast mode or not.
|
||||||
|
*
|
||||||
|
* @param bFastMode True if enabled fast mode.
|
||||||
|
*/
|
||||||
inline void setFastMode(bool bFastMode) { _fastMode = bFastMode; }
|
inline void setFastMode(bool bFastMode) { _fastMode = bFastMode; }
|
||||||
|
|
||||||
|
/** Is the starting position initialized or not.
|
||||||
|
*
|
||||||
|
* @return True if the starting position is initialized.
|
||||||
|
*/
|
||||||
inline bool isStartingPositionInitialized() const { return _startingPositionInitialized; }
|
inline bool isStartingPositionInitialized() const { return _startingPositionInitialized; }
|
||||||
inline void setStartingPositionInitialized(bool bStartingPositionInitialized)
|
/** Sets the starting position initialized or not.
|
||||||
|
*
|
||||||
|
* @param bStartingPositionInitialized True if initialized the starting position.
|
||||||
|
*/
|
||||||
|
inline void setStartingPositionInitialized(bool bStartingPositionInitialized)
|
||||||
{
|
{
|
||||||
_startingPositionInitialized = bStartingPositionInitialized;
|
_startingPositionInitialized = bStartingPositionInitialized;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class GridBase;
|
class GridBase;
|
||||||
|
/**
|
||||||
|
* @addtogroup _2d
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Base class for Grid Node.
|
* @brief Base class for Grid Node.
|
||||||
|
@ -89,6 +93,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(NodeGrid);
|
CC_DISALLOW_COPY_AND_ASSIGN(NodeGrid);
|
||||||
};
|
};
|
||||||
|
/** @} */
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,7 +39,8 @@ struct _ccArray;
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief ParallaxNode: A node that simulates a parallax scroller
|
/** @class ParallaxNode
|
||||||
|
* @brief ParallaxNode: A node that simulates a parallax scroller
|
||||||
|
|
||||||
The children will be moved faster / slower than the parent according the the parallax ratio.
|
The children will be moved faster / slower than the parent according the the parallax ratio.
|
||||||
|
|
||||||
|
@ -47,17 +48,33 @@ The children will be moved faster / slower than the parent according the the par
|
||||||
class CC_DLL ParallaxNode : public Node
|
class CC_DLL ParallaxNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Create a Parallax node
|
/** Create a Parallax node.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParallaxNode object.
|
||||||
|
*/
|
||||||
static ParallaxNode * create();
|
static ParallaxNode * create();
|
||||||
|
|
||||||
// prevents compiler warning: "Included function hides overloaded virtual functions"
|
// prevents compiler warning: "Included function hides overloaded virtual functions"
|
||||||
using Node::addChild;
|
using Node::addChild;
|
||||||
|
|
||||||
|
/** Adds a child to the container with a local z-order, parallax ratio and position offset.
|
||||||
|
*
|
||||||
|
* @param child A child node.
|
||||||
|
* @param z Z order for drawing priority.
|
||||||
|
* @param parallaxRatio A given parallax ratio.
|
||||||
|
* @param positionOffset A given position offset.
|
||||||
|
*/
|
||||||
void addChild(Node * child, int z, const Vec2& parallaxRatio, const Vec2& positionOffset);
|
void addChild(Node * child, int z, const Vec2& parallaxRatio, const Vec2& positionOffset);
|
||||||
|
|
||||||
/** Sets an array of layers for the Parallax node */
|
/** Sets an array of layers for the Parallax node.
|
||||||
|
*
|
||||||
|
* @param parallaxArray An array of layers for the Parallax node.
|
||||||
|
*/
|
||||||
void setParallaxArray( struct _ccArray *parallaxArray) { _parallaxArray = parallaxArray; }
|
void setParallaxArray( struct _ccArray *parallaxArray) { _parallaxArray = parallaxArray; }
|
||||||
/** Returns the array of layers of the Parallax node */
|
/** Returns the array of layers of the Parallax node.
|
||||||
|
*
|
||||||
|
* @return An array of layers for the Parallax node.
|
||||||
|
*/
|
||||||
struct _ccArray* getParallaxArray() { return _parallaxArray; }
|
struct _ccArray* getParallaxArray() { return _parallaxArray; }
|
||||||
const struct _ccArray* getParallaxArray() const { return _parallaxArray; }
|
const struct _ccArray* getParallaxArray() const { return _parallaxArray; }
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ class ParticleSystem;
|
||||||
|
|
||||||
#define kParticleDefaultCapacity 500
|
#define kParticleDefaultCapacity 500
|
||||||
|
|
||||||
/** ParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
|
/** @class ParticleBatchNode
|
||||||
|
* @brief ParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
|
||||||
* (often known as "batch draw").
|
* (often known as "batch draw").
|
||||||
*
|
*
|
||||||
* A ParticleBatchNode can reference one and only one texture (one image file, one texture atlas).
|
* A ParticleBatchNode can reference one and only one texture (one image file, one texture atlas).
|
||||||
|
@ -69,25 +70,53 @@ class ParticleSystem;
|
||||||
class CC_DLL ParticleBatchNode : public Node, public TextureProtocol
|
class CC_DLL ParticleBatchNode : public Node, public TextureProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes the particle system with Texture2D, a capacity of particles, which particle system to use */
|
/** Create the particle system with Texture2D, a capacity of particles, which particle system to use.
|
||||||
|
*
|
||||||
|
* @param tex A given texture.
|
||||||
|
* @param capacity A capacity of particles.
|
||||||
|
* @return An autoreleased ParticleBatchNode object.
|
||||||
|
*/
|
||||||
static ParticleBatchNode* createWithTexture(Texture2D *tex, int capacity = kParticleDefaultCapacity);
|
static ParticleBatchNode* createWithTexture(Texture2D *tex, int capacity = kParticleDefaultCapacity);
|
||||||
|
|
||||||
/** initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles */
|
/** Create the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles.
|
||||||
|
*
|
||||||
|
* @param fileImage A given file name.
|
||||||
|
* @param capacity A capacity of particles.
|
||||||
|
* @return An autoreleased ParticleBatchNode object.
|
||||||
|
*/
|
||||||
static ParticleBatchNode* create(const std::string& fileImage, int capacity = kParticleDefaultCapacity);
|
static ParticleBatchNode* create(const std::string& fileImage, int capacity = kParticleDefaultCapacity);
|
||||||
|
|
||||||
/** Inserts a child into the ParticleBatchNode */
|
/** Inserts a child into the ParticleBatchNode.
|
||||||
|
*
|
||||||
|
* @param system A given particle system.
|
||||||
|
* @param index The insert index.
|
||||||
|
*/
|
||||||
void insertChild(ParticleSystem* system, int index);
|
void insertChild(ParticleSystem* system, int index);
|
||||||
|
|
||||||
|
/** Remove a child of the ParticleBatchNode.
|
||||||
|
*
|
||||||
|
* @param index The index of the child.
|
||||||
|
* @param doCleanup True if all actions and callbacks on this node should be removed, false otherwise.
|
||||||
|
*/
|
||||||
void removeChildAtIndex(int index, bool doCleanup);
|
void removeChildAtIndex(int index, bool doCleanup);
|
||||||
void removeAllChildrenWithCleanup(bool doCleanup) override;
|
void removeAllChildrenWithCleanup(bool doCleanup) override;
|
||||||
|
|
||||||
/** disables a particle by inserting a 0'd quad into the texture atlas */
|
/** Disables a particle by inserting a 0'd quad into the texture atlas.
|
||||||
|
*
|
||||||
|
* @param particleIndex The index of the particle.
|
||||||
|
*/
|
||||||
void disableParticle(int particleIndex);
|
void disableParticle(int particleIndex);
|
||||||
|
|
||||||
/** Gets the texture atlas used for drawing the quads */
|
/** Gets the texture atlas used for drawing the quads.
|
||||||
|
*
|
||||||
|
* @return The texture atlas used for drawing the quads.
|
||||||
|
*/
|
||||||
inline TextureAtlas* getTextureAtlas() const { return _textureAtlas; };
|
inline TextureAtlas* getTextureAtlas() const { return _textureAtlas; };
|
||||||
|
|
||||||
/** Sets the texture atlas used for drawing the quads */
|
/** Sets the texture atlas used for drawing the quads.
|
||||||
|
*
|
||||||
|
* @param atlas The texture atlas used for drawing the quads.
|
||||||
|
*/
|
||||||
inline void setTextureAtlas(TextureAtlas* atlas) { _textureAtlas = atlas; };
|
inline void setTextureAtlas(TextureAtlas* atlas) { _textureAtlas = atlas; };
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
|
|
|
@ -36,11 +36,22 @@ NS_CC_BEGIN
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//! @brief A fire particle system
|
/** @class ParticleFire
|
||||||
|
* @brief A fire particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleFire : public ParticleSystemQuad
|
class CC_DLL ParticleFire : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a fire particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleFire object.
|
||||||
|
*/
|
||||||
static ParticleFire* create();
|
static ParticleFire* create();
|
||||||
|
/** Create a fire particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleFire object.
|
||||||
|
*/
|
||||||
static ParticleFire* createWithTotalParticles(int numberOfParticles);
|
static ParticleFire* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -61,11 +72,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleFire);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleFire);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A fireworks particle system
|
/** @class ParticleFireworks
|
||||||
|
* @brief A fireworks particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleFireworks : public ParticleSystemQuad
|
class CC_DLL ParticleFireworks : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a fireworks particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleFireworks object.
|
||||||
|
*/
|
||||||
static ParticleFireworks* create();
|
static ParticleFireworks* create();
|
||||||
|
/** Create a fireworks particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleFireworks object.
|
||||||
|
*/
|
||||||
static ParticleFireworks* createWithTotalParticles(int numberOfParticles);
|
static ParticleFireworks* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -87,11 +109,22 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A sun particle system
|
/** @class ParticleSun
|
||||||
|
* @brief A sun particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleSun : public ParticleSystemQuad
|
class CC_DLL ParticleSun : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a sun particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleSun object.
|
||||||
|
*/
|
||||||
static ParticleSun* create();
|
static ParticleSun* create();
|
||||||
|
/** Create a sun particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSun object.
|
||||||
|
*/
|
||||||
static ParticleSun* createWithTotalParticles(int numberOfParticles);
|
static ParticleSun* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -113,11 +146,22 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A galaxy particle system
|
/** @class ParticleGalaxy
|
||||||
|
* @brief A galaxy particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleGalaxy : public ParticleSystemQuad
|
class CC_DLL ParticleGalaxy : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a galaxy particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleGalaxy object.
|
||||||
|
*/
|
||||||
static ParticleGalaxy* create();
|
static ParticleGalaxy* create();
|
||||||
|
/** Create a galaxy particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleGalaxy object.
|
||||||
|
*/
|
||||||
static ParticleGalaxy* createWithTotalParticles(int numberOfParticles);
|
static ParticleGalaxy* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -139,11 +183,22 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A flower particle system
|
/** @class ParticleFlower
|
||||||
|
* @brief A flower particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleFlower : public ParticleSystemQuad
|
class CC_DLL ParticleFlower : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a flower particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleFlower object.
|
||||||
|
*/
|
||||||
static ParticleFlower* create();
|
static ParticleFlower* create();
|
||||||
|
/** Create a flower particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleFlower object.
|
||||||
|
*/
|
||||||
static ParticleFlower* createWithTotalParticles(int numberOfParticles);
|
static ParticleFlower* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -164,11 +219,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleFlower);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleFlower);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A meteor particle system
|
/** @class ParticleMeteor
|
||||||
|
* @brief A meteor particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleMeteor : public ParticleSystemQuad
|
class CC_DLL ParticleMeteor : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a meteor particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleMeteor object.
|
||||||
|
*/
|
||||||
static ParticleMeteor * create();
|
static ParticleMeteor * create();
|
||||||
|
/** Create a meteor particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleMeteor object.
|
||||||
|
*/
|
||||||
static ParticleMeteor* createWithTotalParticles(int numberOfParticles);
|
static ParticleMeteor* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -189,11 +255,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleMeteor);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleMeteor);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief An spiral particle system
|
/** @class ParticleSpiral
|
||||||
|
* @brief An spiral particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleSpiral : public ParticleSystemQuad
|
class CC_DLL ParticleSpiral : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a spiral particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleSpiral object.
|
||||||
|
*/
|
||||||
static ParticleSpiral* create();
|
static ParticleSpiral* create();
|
||||||
|
/** Create a spiral particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSpiral object.
|
||||||
|
*/
|
||||||
static ParticleSpiral* createWithTotalParticles(int numberOfParticles);
|
static ParticleSpiral* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -215,11 +292,22 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief An explosion particle system
|
/** @class ParticleExplosion
|
||||||
|
* @brief An explosion particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleExplosion : public ParticleSystemQuad
|
class CC_DLL ParticleExplosion : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a explosion particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleExplosion object.
|
||||||
|
*/
|
||||||
static ParticleExplosion* create();
|
static ParticleExplosion* create();
|
||||||
|
/** Create a explosion particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleExplosion object.
|
||||||
|
*/
|
||||||
static ParticleExplosion* createWithTotalParticles(int numberOfParticles);
|
static ParticleExplosion* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -240,11 +328,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleExplosion);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleExplosion);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief An smoke particle system
|
/** @class ParticleSmoke
|
||||||
|
* @brief An smoke particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleSmoke : public ParticleSystemQuad
|
class CC_DLL ParticleSmoke : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a smoke particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleSmoke object.
|
||||||
|
*/
|
||||||
static ParticleSmoke* create();
|
static ParticleSmoke* create();
|
||||||
|
/** Create a smoke particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSmoke object.
|
||||||
|
*/
|
||||||
static ParticleSmoke* createWithTotalParticles(int numberOfParticles);
|
static ParticleSmoke* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -265,11 +364,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleSmoke);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleSmoke);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief An snow particle system
|
/** @class ParticleSnow
|
||||||
|
* @brief An snow particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleSnow : public ParticleSystemQuad
|
class CC_DLL ParticleSnow : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a snow particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleSnow object.
|
||||||
|
*/
|
||||||
static ParticleSnow* create();
|
static ParticleSnow* create();
|
||||||
|
/** Create a snow particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSnow object.
|
||||||
|
*/
|
||||||
static ParticleSnow* createWithTotalParticles(int numberOfParticles);
|
static ParticleSnow* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -290,11 +400,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(ParticleSnow);
|
CC_DISALLOW_COPY_AND_ASSIGN(ParticleSnow);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @brief A rain particle system
|
/** @class ParticleRain
|
||||||
|
* @brief A rain particle system.
|
||||||
|
*/
|
||||||
class CC_DLL ParticleRain : public ParticleSystemQuad
|
class CC_DLL ParticleRain : public ParticleSystemQuad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Create a rain particle system.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleRain object.
|
||||||
|
*/
|
||||||
static ParticleRain* create();
|
static ParticleRain* create();
|
||||||
|
/** Create a rain particle system withe a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleRain object.
|
||||||
|
*/
|
||||||
static ParticleRain* createWithTotalParticles(int numberOfParticles);
|
static ParticleRain* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
|
@ -40,8 +40,8 @@ NS_CC_BEGIN
|
||||||
|
|
||||||
class ParticleBatchNode;
|
class ParticleBatchNode;
|
||||||
|
|
||||||
/**
|
/** @struct sParticle
|
||||||
Structure that contains the values of each particle
|
Structure that contains the values of each particle.
|
||||||
*/
|
*/
|
||||||
typedef struct sParticle {
|
typedef struct sParticle {
|
||||||
Vec2 pos;
|
Vec2 pos;
|
||||||
|
@ -60,14 +60,18 @@ typedef struct sParticle {
|
||||||
|
|
||||||
unsigned int atlasIndex;
|
unsigned int atlasIndex;
|
||||||
|
|
||||||
//! Mode A: gravity, direction, radial accel, tangential accel
|
/** @struct modeA
|
||||||
|
Mode A: gravity, direction, radial accel, tangential accel.
|
||||||
|
*/
|
||||||
struct {
|
struct {
|
||||||
Vec2 dir;
|
Vec2 dir;
|
||||||
float radialAccel;
|
float radialAccel;
|
||||||
float tangentialAccel;
|
float tangentialAccel;
|
||||||
} modeA;
|
} modeA;
|
||||||
|
|
||||||
//! Mode B: radius mode
|
/** @struct modeB
|
||||||
|
Mode B: radius mode.
|
||||||
|
*/
|
||||||
struct {
|
struct {
|
||||||
float angle;
|
float angle;
|
||||||
float degreesPerSecond;
|
float degreesPerSecond;
|
||||||
|
@ -81,7 +85,8 @@ typedef struct sParticle {
|
||||||
|
|
||||||
class Texture2D;
|
class Texture2D;
|
||||||
|
|
||||||
/** @brief Particle System base class.
|
/** @class ParticleSystem
|
||||||
|
* @brief Particle System base class.
|
||||||
Attributes of a Particle System:
|
Attributes of a Particle System:
|
||||||
- emission rate of the particles
|
- emission rate of the particles
|
||||||
- Gravity Mode (Mode A):
|
- Gravity Mode (Mode A):
|
||||||
|
@ -106,11 +111,11 @@ Attributes of a Particle System:
|
||||||
- blending function
|
- blending function
|
||||||
- texture
|
- texture
|
||||||
|
|
||||||
cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
|
Cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
|
||||||
'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guaranteed in cocos2d,
|
'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guaranteed in cocos2d,
|
||||||
cocos2d uses a another approach, but the results are almost identical.
|
cocos2d uses a another approach, but the results are almost identical.
|
||||||
|
|
||||||
cocos2d supports all the variables used by Particle Designer plus a bit more:
|
Cocos2d supports all the variables used by Particle Designer plus a bit more:
|
||||||
- spinning particles (supported when using ParticleSystemQuad)
|
- spinning particles (supported when using ParticleSystemQuad)
|
||||||
- tangential acceleration (Gravity mode)
|
- tangential acceleration (Gravity mode)
|
||||||
- radial acceleration (Gravity mode)
|
- radial acceleration (Gravity mode)
|
||||||
|
@ -134,101 +139,247 @@ emitter.startSpin = 0;
|
||||||
class CC_DLL ParticleSystem : public Node, public TextureProtocol
|
class CC_DLL ParticleSystem : public Node, public TextureProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Mode
|
||||||
|
*/
|
||||||
enum class Mode
|
enum class Mode
|
||||||
{
|
{
|
||||||
GRAVITY,
|
GRAVITY,
|
||||||
RADIUS,
|
RADIUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @typedef PositionType
|
/** PositionType
|
||||||
possible types of particle positions
|
Possible types of particle positions.
|
||||||
*/
|
*/
|
||||||
enum class PositionType
|
enum class PositionType
|
||||||
{
|
{
|
||||||
/** Living particles are attached to the world and are unaffected by emitter repositioning. */
|
FREE, /** Living particles are attached to the world and are unaffected by emitter repositioning. */
|
||||||
FREE,
|
|
||||||
|
|
||||||
/** Living particles are attached to the world but will follow the emitter repositioning.
|
RELATIVE, /** Living particles are attached to the world but will follow the emitter repositioning.
|
||||||
Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite.
|
Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite.*/
|
||||||
*/
|
|
||||||
RELATIVE,
|
|
||||||
|
|
||||||
/** Living particles are attached to the emitter and are translated along with it. */
|
GROUPED, /** Living particles are attached to the emitter and are translated along with it. */
|
||||||
GROUPED,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//* @enum
|
//* @enum
|
||||||
enum {
|
enum {
|
||||||
/** The Particle emitter lives forever */
|
/** The Particle emitter lives forever. */
|
||||||
DURATION_INFINITY = -1,
|
DURATION_INFINITY = -1,
|
||||||
|
|
||||||
/** The starting size of the particle is equal to the ending size */
|
/** The starting size of the particle is equal to the ending size. */
|
||||||
START_SIZE_EQUAL_TO_END_SIZE = -1,
|
START_SIZE_EQUAL_TO_END_SIZE = -1,
|
||||||
|
|
||||||
/** The starting radius of the particle is equal to the ending radius */
|
/** The starting radius of the particle is equal to the ending radius. */
|
||||||
START_RADIUS_EQUAL_TO_END_RADIUS = -1,
|
START_RADIUS_EQUAL_TO_END_RADIUS = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** creates an initializes a ParticleSystem from a plist file.
|
/** Creates an initializes a ParticleSystem from a plist file.
|
||||||
This plist files can be created manually or with Particle Designer:
|
This plist files can be created manually or with Particle Designer:
|
||||||
http://particledesigner.71squared.com/
|
http://particledesigner.71squared.com/
|
||||||
@since v2.0
|
@since v2.0
|
||||||
*/
|
*
|
||||||
|
* @param Particle plist file name.
|
||||||
|
* @return An autoreleased ParticleSystem object.
|
||||||
|
*/
|
||||||
static ParticleSystem * create(const std::string& plistFile);
|
static ParticleSystem * create(const std::string& plistFile);
|
||||||
|
|
||||||
//! create a system with a fixed number of particles
|
/** Create a system with a fixed number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSystemQuad object.
|
||||||
|
*/
|
||||||
static ParticleSystem* createWithTotalParticles(int numberOfParticles);
|
static ParticleSystem* createWithTotalParticles(int numberOfParticles);
|
||||||
|
|
||||||
//! Add a particle to the emitter
|
/** Add a particle to the emitter.
|
||||||
|
*
|
||||||
|
* @return True if add success.
|
||||||
|
*/
|
||||||
bool addParticle();
|
bool addParticle();
|
||||||
//! Initializes a particle
|
/** Initializes a particle.
|
||||||
|
*
|
||||||
|
* @param particle A given particle pointer.
|
||||||
|
*/
|
||||||
void initParticle(tParticle* particle);
|
void initParticle(tParticle* particle);
|
||||||
//! stop emitting particles. Running particles will continue to run until they die
|
/** Stop emitting particles. Running particles will continue to run until they die.
|
||||||
|
*/
|
||||||
void stopSystem();
|
void stopSystem();
|
||||||
//! Kill all living particles.
|
/** Kill all living particles.
|
||||||
|
*/
|
||||||
void resetSystem();
|
void resetSystem();
|
||||||
//! whether or not the system is full
|
/** Whether or not the system is full.
|
||||||
|
*
|
||||||
|
* @return True if the system is full.
|
||||||
|
*/
|
||||||
bool isFull();
|
bool isFull();
|
||||||
|
|
||||||
//! should be overridden by subclasses
|
/** Update the verts position data of particle,
|
||||||
|
should be overridden by subclasses.
|
||||||
|
*
|
||||||
|
* @param particle A certain particle.
|
||||||
|
* @param newPosition A new position.
|
||||||
|
*/
|
||||||
virtual void updateQuadWithParticle(tParticle* particle, const Vec2& newPosition);
|
virtual void updateQuadWithParticle(tParticle* particle, const Vec2& newPosition);
|
||||||
//! should be overridden by subclasses
|
/** Update the VBO verts buffer which does not use batch node,
|
||||||
|
should be overridden by subclasses. */
|
||||||
virtual void postStep();
|
virtual void postStep();
|
||||||
|
|
||||||
|
/** Call the update mathod with no time..
|
||||||
|
*/
|
||||||
virtual void updateWithNoTime(void);
|
virtual void updateWithNoTime(void);
|
||||||
|
|
||||||
|
/** Whether or not the particle system removed self on finish.
|
||||||
|
*
|
||||||
|
* @return True if the particle system removed self on finish.
|
||||||
|
*/
|
||||||
virtual bool isAutoRemoveOnFinish() const;
|
virtual bool isAutoRemoveOnFinish() const;
|
||||||
|
|
||||||
|
/** Set the particle system auto removed it self on finish.
|
||||||
|
*
|
||||||
|
* @param var True if the particle system removed self on finish.
|
||||||
|
*/
|
||||||
virtual void setAutoRemoveOnFinish(bool var);
|
virtual void setAutoRemoveOnFinish(bool var);
|
||||||
|
|
||||||
// mode A
|
// mode A
|
||||||
|
/** Gets the garvity.
|
||||||
|
*
|
||||||
|
* @return The gravity.
|
||||||
|
*/
|
||||||
virtual const Vec2& getGravity();
|
virtual const Vec2& getGravity();
|
||||||
|
/** Sets the gravity.
|
||||||
|
*
|
||||||
|
* @param g The gravity.
|
||||||
|
*/
|
||||||
virtual void setGravity(const Vec2& g);
|
virtual void setGravity(const Vec2& g);
|
||||||
|
/** Gets the speed.
|
||||||
|
*
|
||||||
|
* @return The speed.
|
||||||
|
*/
|
||||||
virtual float getSpeed() const;
|
virtual float getSpeed() const;
|
||||||
|
/** Sets the speed.
|
||||||
|
*
|
||||||
|
* @param speed The speed.
|
||||||
|
*/
|
||||||
virtual void setSpeed(float speed);
|
virtual void setSpeed(float speed);
|
||||||
|
/** Gets the speed variance.
|
||||||
|
*
|
||||||
|
* @return The speed variance.
|
||||||
|
*/
|
||||||
virtual float getSpeedVar() const;
|
virtual float getSpeedVar() const;
|
||||||
|
/** Sets the speed variance.
|
||||||
|
*
|
||||||
|
* @param speed The speed variance.
|
||||||
|
*/
|
||||||
virtual void setSpeedVar(float speed);
|
virtual void setSpeedVar(float speed);
|
||||||
|
/** Gets the tangential acceleration.
|
||||||
|
*
|
||||||
|
* @return The tangential acceleration.
|
||||||
|
*/
|
||||||
virtual float getTangentialAccel() const;
|
virtual float getTangentialAccel() const;
|
||||||
|
/** Sets the tangential acceleration.
|
||||||
|
*
|
||||||
|
* @param t The tangential acceleration.
|
||||||
|
*/
|
||||||
virtual void setTangentialAccel(float t);
|
virtual void setTangentialAccel(float t);
|
||||||
|
/** Gets the tangential acceleration variance.
|
||||||
|
*
|
||||||
|
* @return The tangential acceleration variance.
|
||||||
|
*/
|
||||||
virtual float getTangentialAccelVar() const;
|
virtual float getTangentialAccelVar() const;
|
||||||
|
/** Sets the tangential acceleration variance.
|
||||||
|
*
|
||||||
|
* @param t The tangential acceleration variance.
|
||||||
|
*/
|
||||||
virtual void setTangentialAccelVar(float t);
|
virtual void setTangentialAccelVar(float t);
|
||||||
|
/** Gets the radial acceleration.
|
||||||
|
*
|
||||||
|
* @return The radial acceleration.
|
||||||
|
*/
|
||||||
virtual float getRadialAccel() const;
|
virtual float getRadialAccel() const;
|
||||||
|
/** Sets the radial acceleration.
|
||||||
|
*
|
||||||
|
* @param t The radial acceleration.
|
||||||
|
*/
|
||||||
virtual void setRadialAccel(float t);
|
virtual void setRadialAccel(float t);
|
||||||
|
/** Gets the radial acceleration variance.
|
||||||
|
*
|
||||||
|
* @return The radial acceleration variance.
|
||||||
|
*/
|
||||||
virtual float getRadialAccelVar() const;
|
virtual float getRadialAccelVar() const;
|
||||||
|
/** Sets the radial acceleration variance.
|
||||||
|
*
|
||||||
|
* @param t The radial acceleration variance.
|
||||||
|
*/
|
||||||
virtual void setRadialAccelVar(float t);
|
virtual void setRadialAccelVar(float t);
|
||||||
|
/** Whether or not the rotation of each particle to its direction.
|
||||||
|
*
|
||||||
|
* @return True if the rotation is the direction.
|
||||||
|
*/
|
||||||
virtual bool getRotationIsDir() const;
|
virtual bool getRotationIsDir() const;
|
||||||
|
/** Sets the rotation of each particle to its direction.
|
||||||
|
*
|
||||||
|
* @param t True if the rotation is the direction.
|
||||||
|
*/
|
||||||
virtual void setRotationIsDir(bool t);
|
virtual void setRotationIsDir(bool t);
|
||||||
// mode B
|
// mode B
|
||||||
|
/** Gets the start radius.
|
||||||
|
*
|
||||||
|
* @return The start radius.
|
||||||
|
*/
|
||||||
virtual float getStartRadius() const;
|
virtual float getStartRadius() const;
|
||||||
|
/** Sets the start radius.
|
||||||
|
*
|
||||||
|
* @param startRadius The start radius.
|
||||||
|
*/
|
||||||
virtual void setStartRadius(float startRadius);
|
virtual void setStartRadius(float startRadius);
|
||||||
|
/** Gets the start radius variance.
|
||||||
|
*
|
||||||
|
* @return The start radius variance.
|
||||||
|
*/
|
||||||
virtual float getStartRadiusVar() const;
|
virtual float getStartRadiusVar() const;
|
||||||
|
/** Sets the start radius variance.
|
||||||
|
*
|
||||||
|
* @param startRadiusVar The start radius variance.
|
||||||
|
*/
|
||||||
virtual void setStartRadiusVar(float startRadiusVar);
|
virtual void setStartRadiusVar(float startRadiusVar);
|
||||||
|
/** Gets the end radius.
|
||||||
|
*
|
||||||
|
* @return The end radius.
|
||||||
|
*/
|
||||||
virtual float getEndRadius() const;
|
virtual float getEndRadius() const;
|
||||||
|
/** Sets the end radius.
|
||||||
|
*
|
||||||
|
* @param endRadius The end radius.
|
||||||
|
*/
|
||||||
virtual void setEndRadius(float endRadius);
|
virtual void setEndRadius(float endRadius);
|
||||||
|
/** Gets the end radius variance.
|
||||||
|
*
|
||||||
|
* @return The end radius variance.
|
||||||
|
*/
|
||||||
virtual float getEndRadiusVar() const;
|
virtual float getEndRadiusVar() const;
|
||||||
|
/** Sets the end radius variance.
|
||||||
|
*
|
||||||
|
* @param endRadiusVar The end radius variance.
|
||||||
|
*/
|
||||||
virtual void setEndRadiusVar(float endRadiusVar);
|
virtual void setEndRadiusVar(float endRadiusVar);
|
||||||
|
/** Gets the number of degrees to rotate a particle around the source pos per second.
|
||||||
|
*
|
||||||
|
* @return The number of degrees to rotate a particle around the source pos per second.
|
||||||
|
*/
|
||||||
virtual float getRotatePerSecond() const;
|
virtual float getRotatePerSecond() const;
|
||||||
|
/** Sets the number of degrees to rotate a particle around the source pos per second.
|
||||||
|
*
|
||||||
|
* @param degrees The number of degrees to rotate a particle around the source pos per second.
|
||||||
|
*/
|
||||||
virtual void setRotatePerSecond(float degrees);
|
virtual void setRotatePerSecond(float degrees);
|
||||||
|
/** Gets the rotate per second variance.
|
||||||
|
*
|
||||||
|
* @return The rotate per second variance.
|
||||||
|
*/
|
||||||
virtual float getRotatePerSecondVar() const;
|
virtual float getRotatePerSecondVar() const;
|
||||||
|
/** Sets the rotate per second variance.
|
||||||
|
*
|
||||||
|
* @param degrees The rotate per second variance.
|
||||||
|
*/
|
||||||
virtual void setRotatePerSecondVar(float degrees);
|
virtual void setRotatePerSecondVar(float degrees);
|
||||||
|
|
||||||
virtual void setScale(float s) override;
|
virtual void setScale(float s) override;
|
||||||
|
@ -236,109 +387,292 @@ public:
|
||||||
virtual void setScaleX(float newScaleX) override;
|
virtual void setScaleX(float newScaleX) override;
|
||||||
virtual void setScaleY(float newScaleY) override;
|
virtual void setScaleY(float newScaleY) override;
|
||||||
|
|
||||||
|
/** Whether or not the particle system is active.
|
||||||
|
*
|
||||||
|
* @return True if the particle system is active.
|
||||||
|
*/
|
||||||
virtual bool isActive() const;
|
virtual bool isActive() const;
|
||||||
|
/** Whether or not the particle system is blend additive.
|
||||||
|
*
|
||||||
|
* @return True if the particle system is blend additive.
|
||||||
|
*/
|
||||||
virtual bool isBlendAdditive() const;
|
virtual bool isBlendAdditive() const;
|
||||||
|
/** Sets the particle system blend additive.
|
||||||
|
*
|
||||||
|
* @param value True if the particle system is blend additive.
|
||||||
|
*/
|
||||||
virtual void setBlendAdditive(bool value);
|
virtual void setBlendAdditive(bool value);
|
||||||
|
|
||||||
|
/** Gets the batch node.
|
||||||
|
*
|
||||||
|
* @return The batch node.
|
||||||
|
*/
|
||||||
virtual ParticleBatchNode* getBatchNode() const;
|
virtual ParticleBatchNode* getBatchNode() const;
|
||||||
|
/** Sets the batch node.
|
||||||
|
*
|
||||||
|
* @param batchNode The batch node.
|
||||||
|
*/
|
||||||
virtual void setBatchNode(ParticleBatchNode* batchNode);
|
virtual void setBatchNode(ParticleBatchNode* batchNode);
|
||||||
|
|
||||||
// index of system in batch node array
|
/** Gets the index of system in batch node array.
|
||||||
|
*
|
||||||
|
* @return The index of system in batch node array.
|
||||||
|
*/
|
||||||
inline int getAtlasIndex() const { return _atlasIndex; };
|
inline int getAtlasIndex() const { return _atlasIndex; };
|
||||||
|
/** Sets the index of system in batch node array.
|
||||||
|
*
|
||||||
|
* @param index The index of system in batch node array.
|
||||||
|
*/
|
||||||
inline void setAtlasIndex(int index) { _atlasIndex = index; };
|
inline void setAtlasIndex(int index) { _atlasIndex = index; };
|
||||||
|
|
||||||
/** Quantity of particles that are being simulated at the moment */
|
/** Gets the Quantity of particles that are being simulated at the moment.
|
||||||
|
*
|
||||||
|
* @return The Quantity of particles that are being simulated at the moment.
|
||||||
|
*/
|
||||||
inline unsigned int getParticleCount() const { return _particleCount; };
|
inline unsigned int getParticleCount() const { return _particleCount; };
|
||||||
|
|
||||||
/** How many seconds the emitter will run. -1 means 'forever' */
|
/** Gets how many seconds the emitter will run. -1 means 'forever'.
|
||||||
|
*
|
||||||
|
* @return The seconds that the emitter will run. -1 means 'forever'.
|
||||||
|
*/
|
||||||
inline float getDuration() const { return _duration; };
|
inline float getDuration() const { return _duration; };
|
||||||
|
/** Sets how many seconds the emitter will run. -1 means 'forever'.
|
||||||
|
*
|
||||||
|
* @param duration The seconds that the emitter will run. -1 means 'forever'.
|
||||||
|
*/
|
||||||
inline void setDuration(float duration) { _duration = duration; };
|
inline void setDuration(float duration) { _duration = duration; };
|
||||||
|
|
||||||
/** sourcePosition of the emitter */
|
/** Gets the source position of the emitter.
|
||||||
|
*
|
||||||
|
* @return The source position of the emitter.
|
||||||
|
*/
|
||||||
inline const Vec2& getSourcePosition() const { return _sourcePosition; };
|
inline const Vec2& getSourcePosition() const { return _sourcePosition; };
|
||||||
|
/** Sets the source position of the emitter.
|
||||||
|
*
|
||||||
|
* @param The source position of the emitter.
|
||||||
|
*/
|
||||||
inline void setSourcePosition(const Vec2& pos) { _sourcePosition = pos; };
|
inline void setSourcePosition(const Vec2& pos) { _sourcePosition = pos; };
|
||||||
|
|
||||||
/** Position variance of the emitter */
|
/** Gets the position variance of the emitter.
|
||||||
|
*
|
||||||
|
* @return The position variance of the emitter.
|
||||||
|
*/
|
||||||
inline const Vec2& getPosVar() const { return _posVar; };
|
inline const Vec2& getPosVar() const { return _posVar; };
|
||||||
|
/** Sets the position variance of the emitter.
|
||||||
|
*
|
||||||
|
* @param pos The position variance of the emitter.
|
||||||
|
*/
|
||||||
inline void setPosVar(const Vec2& pos) { _posVar = pos; };
|
inline void setPosVar(const Vec2& pos) { _posVar = pos; };
|
||||||
|
|
||||||
/** life, and life variation of each particle */
|
/** Gets the life of each particle.
|
||||||
|
*
|
||||||
|
* @return The life of each particle.
|
||||||
|
*/
|
||||||
inline float getLife() const { return _life; };
|
inline float getLife() const { return _life; };
|
||||||
|
/** Sets the life of each particle.
|
||||||
|
*
|
||||||
|
* @param life The life of each particle.
|
||||||
|
*/
|
||||||
inline void setLife(float life) { _life = life; };
|
inline void setLife(float life) { _life = life; };
|
||||||
|
|
||||||
/** life variance of each particle */
|
/** Gets the life variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The life variance of each particle.
|
||||||
|
*/
|
||||||
inline float getLifeVar() const { return _lifeVar; };
|
inline float getLifeVar() const { return _lifeVar; };
|
||||||
|
/** Sets the life variance of each particle.
|
||||||
|
*
|
||||||
|
* @param lifeVar The life variance of each particle.
|
||||||
|
*/
|
||||||
inline void setLifeVar(float lifeVar) { _lifeVar = lifeVar; };
|
inline void setLifeVar(float lifeVar) { _lifeVar = lifeVar; };
|
||||||
|
|
||||||
/** angle and angle variation of each particle */
|
/** Gets the angle of each particle.
|
||||||
|
*
|
||||||
|
* @return The angle of each particle.
|
||||||
|
*/
|
||||||
inline float getAngle() const { return _angle; };
|
inline float getAngle() const { return _angle; };
|
||||||
|
/** Sets the angle of each particle.
|
||||||
|
*
|
||||||
|
* @param angle The angle of each particle.
|
||||||
|
*/
|
||||||
inline void setAngle(float angle) { _angle = angle; };
|
inline void setAngle(float angle) { _angle = angle; };
|
||||||
|
|
||||||
/** angle variance of each particle */
|
/** Gets the angle variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The angle variance of each particle.
|
||||||
|
*/
|
||||||
inline float getAngleVar() const { return _angleVar; };
|
inline float getAngleVar() const { return _angleVar; };
|
||||||
|
/** Sets the angle variance of each particle.
|
||||||
|
*
|
||||||
|
* @param angleVar The angle variance of each particle.
|
||||||
|
*/
|
||||||
inline void setAngleVar(float angleVar) { _angleVar = angleVar; };
|
inline void setAngleVar(float angleVar) { _angleVar = angleVar; };
|
||||||
|
|
||||||
/** Switch between different kind of emitter modes:
|
/** Switch between different kind of emitter modes:
|
||||||
- kParticleModeGravity: uses gravity, speed, radial and tangential acceleration
|
- kParticleModeGravity: uses gravity, speed, radial and tangential acceleration.
|
||||||
- kParticleModeRadius: uses radius movement + rotation
|
- kParticleModeRadius: uses radius movement + rotation.
|
||||||
|
*
|
||||||
|
* @return The mode of the emitter.
|
||||||
*/
|
*/
|
||||||
inline Mode getEmitterMode() const { return _emitterMode; };
|
inline Mode getEmitterMode() const { return _emitterMode; };
|
||||||
|
/** Sets the mode of the emitter.
|
||||||
|
*
|
||||||
|
* @param mode The mode of the emitter.
|
||||||
|
*/
|
||||||
inline void setEmitterMode(Mode mode) { _emitterMode = mode; };
|
inline void setEmitterMode(Mode mode) { _emitterMode = mode; };
|
||||||
|
|
||||||
/** start size in pixels of each particle */
|
/** Gets the start size in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @return The start size in pixels of each particle.
|
||||||
|
*/
|
||||||
inline float getStartSize() const { return _startSize; };
|
inline float getStartSize() const { return _startSize; };
|
||||||
|
/** Sets the start size in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @param startSize The start size in pixels of each particle.
|
||||||
|
*/
|
||||||
inline void setStartSize(float startSize) { _startSize = startSize; };
|
inline void setStartSize(float startSize) { _startSize = startSize; };
|
||||||
|
|
||||||
/** size variance in pixels of each particle */
|
/** Gets the start size variance in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @return The start size variance in pixels of each particle.
|
||||||
|
*/
|
||||||
inline float getStartSizeVar() const { return _startSizeVar; };
|
inline float getStartSizeVar() const { return _startSizeVar; };
|
||||||
|
/** Sets the start size variance in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @param sizeVar The start size variance in pixels of each particle.
|
||||||
|
*/
|
||||||
inline void setStartSizeVar(float sizeVar) { _startSizeVar = sizeVar; };
|
inline void setStartSizeVar(float sizeVar) { _startSizeVar = sizeVar; };
|
||||||
|
|
||||||
/** end size in pixels of each particle */
|
/** Gets the end size in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @return The end size in pixels of each particle.
|
||||||
|
*/
|
||||||
inline float getEndSize() const { return _endSize; };
|
inline float getEndSize() const { return _endSize; };
|
||||||
|
/** Sets the end size in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @param endSize The end size in pixels of each particle.
|
||||||
|
*/
|
||||||
inline void setEndSize(float endSize) { _endSize = endSize; };
|
inline void setEndSize(float endSize) { _endSize = endSize; };
|
||||||
|
|
||||||
/** end size variance in pixels of each particle */
|
/** Gets the end size variance in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @return The end size variance in pixels of each particle.
|
||||||
|
*/
|
||||||
inline float getEndSizeVar() const { return _endSizeVar; };
|
inline float getEndSizeVar() const { return _endSizeVar; };
|
||||||
|
/** Sets the end size variance in pixels of each particle.
|
||||||
|
*
|
||||||
|
* @param sizeVar The end size variance in pixels of each particle.
|
||||||
|
*/
|
||||||
inline void setEndSizeVar(float sizeVar) { _endSizeVar = sizeVar; };
|
inline void setEndSizeVar(float sizeVar) { _endSizeVar = sizeVar; };
|
||||||
|
|
||||||
/** start color of each particle */
|
/** Gets the start color of each particle.
|
||||||
|
*
|
||||||
|
* @return The start color of each particle.
|
||||||
|
*/
|
||||||
inline const Color4F& getStartColor() const { return _startColor; };
|
inline const Color4F& getStartColor() const { return _startColor; };
|
||||||
|
/** Sets the start color of each particle.
|
||||||
|
*
|
||||||
|
* @param color The start color of each particle.
|
||||||
|
*/
|
||||||
inline void setStartColor(const Color4F& color) { _startColor = color; };
|
inline void setStartColor(const Color4F& color) { _startColor = color; };
|
||||||
|
|
||||||
/** start color variance of each particle */
|
/** Gets the start color variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The start color variance of each particle.
|
||||||
|
*/
|
||||||
inline const Color4F& getStartColorVar() const { return _startColorVar; };
|
inline const Color4F& getStartColorVar() const { return _startColorVar; };
|
||||||
|
/** Sets the start color variance of each particle.
|
||||||
|
*
|
||||||
|
* @param color The start color variance of each particle.
|
||||||
|
*/
|
||||||
inline void setStartColorVar(const Color4F& color) { _startColorVar = color; };
|
inline void setStartColorVar(const Color4F& color) { _startColorVar = color; };
|
||||||
|
|
||||||
/** end color and end color variation of each particle */
|
/** Gets the end color and end color variation of each particle.
|
||||||
|
*
|
||||||
|
* @return The end color and end color variation of each particle.
|
||||||
|
*/
|
||||||
inline const Color4F& getEndColor() const { return _endColor; };
|
inline const Color4F& getEndColor() const { return _endColor; };
|
||||||
|
/** Sets the end color and end color variation of each particle.
|
||||||
|
*
|
||||||
|
* @param color The end color and end color variation of each particle.
|
||||||
|
*/
|
||||||
inline void setEndColor(const Color4F& color) { _endColor = color; };
|
inline void setEndColor(const Color4F& color) { _endColor = color; };
|
||||||
|
|
||||||
/** end color variance of each particle */
|
/** Gets the end color variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The end color variance of each particle.
|
||||||
|
*/
|
||||||
inline const Color4F& getEndColorVar() const { return _endColorVar; };
|
inline const Color4F& getEndColorVar() const { return _endColorVar; };
|
||||||
|
/** Sets the end color variance of each particle.
|
||||||
|
*
|
||||||
|
* @param color The end color variance of each particle.
|
||||||
|
*/
|
||||||
inline void setEndColorVar(const Color4F& color) { _endColorVar = color; };
|
inline void setEndColorVar(const Color4F& color) { _endColorVar = color; };
|
||||||
|
|
||||||
//* initial angle of each particle
|
/** Gets the start spin of each particle.
|
||||||
|
*
|
||||||
|
* @return The start spin of each particle.
|
||||||
|
*/
|
||||||
inline float getStartSpin() const { return _startSpin; };
|
inline float getStartSpin() const { return _startSpin; };
|
||||||
|
/** Sets the start spin of each particle.
|
||||||
|
*
|
||||||
|
* @param spin The start spin of each particle.
|
||||||
|
*/
|
||||||
inline void setStartSpin(float spin) { _startSpin = spin; };
|
inline void setStartSpin(float spin) { _startSpin = spin; };
|
||||||
|
|
||||||
//* initial angle of each particle
|
/** Gets the start spin variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The start spin variance of each particle.
|
||||||
|
*/
|
||||||
inline float getStartSpinVar() const { return _startSpinVar; };
|
inline float getStartSpinVar() const { return _startSpinVar; };
|
||||||
|
/** Sets the start spin variance of each particle.
|
||||||
|
*
|
||||||
|
* @param pinVar The start spin variance of each particle.
|
||||||
|
*/
|
||||||
inline void setStartSpinVar(float pinVar) { _startSpinVar = pinVar; };
|
inline void setStartSpinVar(float pinVar) { _startSpinVar = pinVar; };
|
||||||
|
|
||||||
//* initial angle of each particle
|
/** Gets the end spin of each particle.
|
||||||
|
*
|
||||||
|
* @return The end spin of each particle.
|
||||||
|
*/
|
||||||
inline float getEndSpin() const { return _endSpin; };
|
inline float getEndSpin() const { return _endSpin; };
|
||||||
|
/** Sets the end spin of each particle.
|
||||||
|
*
|
||||||
|
* @param endSpin The end spin of each particle.
|
||||||
|
*/
|
||||||
inline void setEndSpin(float endSpin) { _endSpin = endSpin; };
|
inline void setEndSpin(float endSpin) { _endSpin = endSpin; };
|
||||||
|
|
||||||
//* initial angle of each particle
|
/** Gets the end spin variance of each particle.
|
||||||
|
*
|
||||||
|
* @return The end spin variance of each particle.
|
||||||
|
*/
|
||||||
inline float getEndSpinVar() const { return _endSpinVar; };
|
inline float getEndSpinVar() const { return _endSpinVar; };
|
||||||
|
/** Sets the end spin variance of each particle.
|
||||||
|
*
|
||||||
|
* @param endSpinVar The end spin variance of each particle.
|
||||||
|
*/
|
||||||
inline void setEndSpinVar(float endSpinVar) { _endSpinVar = endSpinVar; };
|
inline void setEndSpinVar(float endSpinVar) { _endSpinVar = endSpinVar; };
|
||||||
|
|
||||||
/** emission rate of the particles */
|
/** Gets the emission rate of the particles.
|
||||||
|
*
|
||||||
|
* @return The emission rate of the particles.
|
||||||
|
*/
|
||||||
inline float getEmissionRate() const { return _emissionRate; };
|
inline float getEmissionRate() const { return _emissionRate; };
|
||||||
|
/** Sets the emission rate of the particles.
|
||||||
|
*
|
||||||
|
* @param rate The emission rate of the particles.
|
||||||
|
*/
|
||||||
inline void setEmissionRate(float rate) { _emissionRate = rate; };
|
inline void setEmissionRate(float rate) { _emissionRate = rate; };
|
||||||
|
|
||||||
/** maximum particles of the system */
|
/** Gets the maximum particles of the system.
|
||||||
|
*
|
||||||
|
* @return The maximum particles of the system.
|
||||||
|
*/
|
||||||
virtual int getTotalParticles() const;
|
virtual int getTotalParticles() const;
|
||||||
|
/** Sets the maximum particles of the system.
|
||||||
|
*
|
||||||
|
* @param totalParticles The maximum particles of the system.
|
||||||
|
*/
|
||||||
virtual void setTotalParticles(int totalParticles);
|
virtual void setTotalParticles(int totalParticles);
|
||||||
|
|
||||||
/** does the alpha value modify color */
|
/** does the alpha value modify color */
|
||||||
|
@ -346,10 +680,17 @@ public:
|
||||||
inline bool isOpacityModifyRGB() const override { return _opacityModifyRGB; };
|
inline bool isOpacityModifyRGB() const override { return _opacityModifyRGB; };
|
||||||
CC_DEPRECATED_ATTRIBUTE inline bool getOpacityModifyRGB() const { return isOpacityModifyRGB(); }
|
CC_DEPRECATED_ATTRIBUTE inline bool getOpacityModifyRGB() const { return isOpacityModifyRGB(); }
|
||||||
|
|
||||||
/** particles movement type: Free or Grouped
|
/** Gets the particles movement type: Free or Grouped.
|
||||||
@since v0.8
|
@since v0.8
|
||||||
|
*
|
||||||
|
* @return The particles movement type.
|
||||||
*/
|
*/
|
||||||
inline PositionType getPositionType() const { return _positionType; };
|
inline PositionType getPositionType() const { return _positionType; };
|
||||||
|
/** Sets the particles movement type: Free or Grouped.
|
||||||
|
@since v0.8
|
||||||
|
*
|
||||||
|
* @param type The particles movement type.
|
||||||
|
*/
|
||||||
inline void setPositionType(PositionType type) { _positionType = type; };
|
inline void setPositionType(PositionType type) { _positionType = type; };
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
|
|
|
@ -41,35 +41,52 @@ class EventCustom;
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief ParticleSystemQuad is a subclass of ParticleSystem
|
/** @class ParticleSystemQuad
|
||||||
|
* @brief ParticleSystemQuad is a subclass of ParticleSystem.
|
||||||
|
|
||||||
It includes all the features of ParticleSystem.
|
It includes all the features of ParticleSystem.
|
||||||
|
|
||||||
Special features and Limitations:
|
Special features and Limitations:
|
||||||
- Particle size can be any float number.
|
- Particle size can be any float number.
|
||||||
- The system can be scaled
|
- The system can be scaled.
|
||||||
- The particles can be rotated
|
- The particles can be rotated.
|
||||||
- It supports subrects
|
- It supports subrects.
|
||||||
- It supports batched rendering since 1.1
|
- It supports batched rendering since 1.1.
|
||||||
@since v0.8
|
@since v0.8
|
||||||
*/
|
*/
|
||||||
class CC_DLL ParticleSystemQuad : public ParticleSystem
|
class CC_DLL ParticleSystemQuad : public ParticleSystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** creates a Particle Emitter */
|
/** Creates a Particle Emitter.
|
||||||
|
*
|
||||||
|
* @return An autoreleased ParticleSystemQuad object.
|
||||||
|
*/
|
||||||
static ParticleSystemQuad * create();
|
static ParticleSystemQuad * create();
|
||||||
/** creates a Particle Emitter with a number of particles */
|
/** Creates a Particle Emitter with a number of particles.
|
||||||
|
*
|
||||||
|
* @param numberOfParticles A given number of particles.
|
||||||
|
* @return An autoreleased ParticleSystemQuad object.
|
||||||
|
*/
|
||||||
static ParticleSystemQuad * createWithTotalParticles(int numberOfParticles);
|
static ParticleSystemQuad * createWithTotalParticles(int numberOfParticles);
|
||||||
/** creates an initializes a ParticleSystemQuad from a plist file.
|
/** Creates an initializes a ParticleSystemQuad from a plist file.
|
||||||
This plist files can be created manually or with Particle Designer:
|
This plist files can be created manually or with Particle Designer.
|
||||||
|
*
|
||||||
|
* @param filename Particle plist file name.
|
||||||
|
* @return An autoreleased ParticleSystemQuad object.
|
||||||
*/
|
*/
|
||||||
static ParticleSystemQuad * create(const std::string& filename);
|
static ParticleSystemQuad * create(const std::string& filename);
|
||||||
/** creates a Particle Emitter with a dictionary */
|
/** Creates a Particle Emitter with a dictionary.
|
||||||
|
*
|
||||||
|
* @param dictionary Particle dictionary.
|
||||||
|
* @return An autoreleased ParticleSystemQuad object.
|
||||||
|
*/
|
||||||
static ParticleSystemQuad * create(ValueMap &dictionary);
|
static ParticleSystemQuad * create(ValueMap &dictionary);
|
||||||
|
|
||||||
/** Sets a new SpriteFrame as particle.
|
/** Sets a new SpriteFrame as particle.
|
||||||
WARNING: this method is experimental. Use setTextureWithRect instead.
|
WARNING: this method is experimental. Use setTextureWithRect instead.
|
||||||
|
*
|
||||||
|
* @param spriteFrame A given sprite frame as particle texture.
|
||||||
@since v0.99.4
|
@since v0.99.4
|
||||||
*/
|
*/
|
||||||
void setDisplayFrame(SpriteFrame *spriteFrame);
|
void setDisplayFrame(SpriteFrame *spriteFrame);
|
||||||
|
@ -78,12 +95,17 @@ public:
|
||||||
@since v0.99.4
|
@since v0.99.4
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
*
|
||||||
|
* @param texture A given texture.
|
||||||
|
8 @param rect A given rect, in points.
|
||||||
*/
|
*/
|
||||||
void setTextureWithRect(Texture2D *texture, const Rect& rect);
|
void setTextureWithRect(Texture2D *texture, const Rect& rect);
|
||||||
|
|
||||||
/** listen the event that renderer was recreated on Android/WP8
|
/** Listen the event that renderer was recreated on Android/WP8.
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
*
|
||||||
|
* @param event the event that renderer was recreated on Android/WP8.
|
||||||
*/
|
*/
|
||||||
void listenRendererRecreated(EventCustom* event);
|
void listenRendererRecreated(EventCustom* event);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ NS_CC_BEGIN
|
||||||
class Sprite;
|
class Sprite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup misc_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -37,118 +37,227 @@ NS_CC_BEGIN
|
||||||
class EventCustom;
|
class EventCustom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup textures
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief RenderTexture is a generic rendering target. To render things into it,
|
* @brief RenderTexture is a generic rendering target. To render things into it,
|
||||||
simply construct a render target, call begin on it, call visit on any cocos
|
* simply construct a render target, call begin on it, call visit on any cocos
|
||||||
scenes or objects to render them, and call end. For convenience, render texture
|
* scenes or objects to render them, and call end. For convenience, render texture
|
||||||
adds a sprite as it's display child with the results, so you can simply add
|
* adds a sprite as it's display child with the results, so you can simply add
|
||||||
the render texture to your scene and treat it like any other CocosNode.
|
* the render texture to your scene and treat it like any other CocosNode.
|
||||||
There are also functions for saving the render texture to disk in PNG or JPG format.
|
* There are also functions for saving the render texture to disk in PNG or JPG format.
|
||||||
|
* @since v0.8.1
|
||||||
@since v0.8.1
|
*/
|
||||||
*/
|
|
||||||
class CC_DLL RenderTexture : public Node
|
class CC_DLL RenderTexture : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/
|
/** Initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format.
|
||||||
|
*
|
||||||
|
* @param w The RenderTexture object width.
|
||||||
|
* @param h The RenderTexture object height.
|
||||||
|
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
|
||||||
|
* @param depthStencilFormat The depthStencil format.
|
||||||
|
*/
|
||||||
static RenderTexture * create(int w ,int h, Texture2D::PixelFormat format, GLuint depthStencilFormat);
|
static RenderTexture * create(int w ,int h, Texture2D::PixelFormat format, GLuint depthStencilFormat);
|
||||||
|
|
||||||
/** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */
|
/** Creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid.
|
||||||
|
*
|
||||||
|
* @param w The RenderTexture object width.
|
||||||
|
* @param h The RenderTexture object height.
|
||||||
|
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
|
||||||
|
*/
|
||||||
static RenderTexture * create(int w, int h, Texture2D::PixelFormat format);
|
static RenderTexture * create(int w, int h, Texture2D::PixelFormat format);
|
||||||
|
|
||||||
/** creates a RenderTexture object with width and height in Points, pixel format is RGBA8888 */
|
/** Creates a RenderTexture object with width and height in Points, pixel format is RGBA8888.
|
||||||
|
*
|
||||||
|
* @param w The RenderTexture object width.
|
||||||
|
* @param h The RenderTexture object height.
|
||||||
|
*/
|
||||||
static RenderTexture * create(int w, int h);
|
static RenderTexture * create(int w, int h);
|
||||||
|
|
||||||
/** starts grabbing */
|
/** Starts grabbing. */
|
||||||
virtual void begin();
|
virtual void begin();
|
||||||
|
|
||||||
/** starts rendering to the texture while clearing the texture first.
|
/** Starts rendering to the texture while clearing the texture first.
|
||||||
This is more efficient then calling -clear first and then -begin */
|
* This is more efficient then calling -clear first and then -begin.
|
||||||
|
*
|
||||||
|
* @param r Red.
|
||||||
|
* @param g Green.
|
||||||
|
* @param b Blue.
|
||||||
|
* @param a Alpha.
|
||||||
|
*/
|
||||||
virtual void beginWithClear(float r, float g, float b, float a);
|
virtual void beginWithClear(float r, float g, float b, float a);
|
||||||
|
|
||||||
/** starts rendering to the texture while clearing the texture first.
|
/** Starts rendering to the texture while clearing the texture first.
|
||||||
This is more efficient then calling -clear first and then -begin */
|
* This is more efficient then calling -clear first and then -begin.
|
||||||
|
*
|
||||||
|
* @param r Red.
|
||||||
|
* @param g Green.
|
||||||
|
* @param b Blue.
|
||||||
|
* @param a Alpha.
|
||||||
|
*/
|
||||||
virtual void beginWithClear(float r, float g, float b, float a, float depthValue);
|
virtual void beginWithClear(float r, float g, float b, float a, float depthValue);
|
||||||
|
|
||||||
/** starts rendering to the texture while clearing the texture first.
|
/** Starts rendering to the texture while clearing the texture first.
|
||||||
This is more efficient then calling -clear first and then -begin */
|
* This is more efficient then calling -clear first and then -begin.
|
||||||
|
*
|
||||||
|
* @param r Red.
|
||||||
|
* @param g Green.
|
||||||
|
* @param b Blue.
|
||||||
|
* @param a Alpha.
|
||||||
|
* @param depthValue A specified depth value.
|
||||||
|
* @param stencilValue A specified stencil value.
|
||||||
|
*/
|
||||||
virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
|
virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
|
||||||
|
|
||||||
/** end is key word of lua, use other name to export to lua. */
|
/** End is key word of lua, use other name to export to lua. */
|
||||||
inline void endToLua(){ end();};
|
inline void endToLua(){ end();};
|
||||||
|
|
||||||
/** ends grabbing*/
|
/** Ends grabbing. */
|
||||||
virtual void end();
|
virtual void end();
|
||||||
|
|
||||||
/** clears the texture with a color */
|
/** Clears the texture with a color.
|
||||||
|
*
|
||||||
|
* @param r Red.
|
||||||
|
* @param g Green.
|
||||||
|
* @param b Blue.
|
||||||
|
* @param a Alpha.
|
||||||
|
*/
|
||||||
void clear(float r, float g, float b, float a);
|
void clear(float r, float g, float b, float a);
|
||||||
|
|
||||||
/** clears the texture with a specified depth value */
|
/** Clears the texture with a specified depth value.
|
||||||
|
*
|
||||||
|
* @param A specified depth value.
|
||||||
|
*/
|
||||||
virtual void clearDepth(float depthValue);
|
virtual void clearDepth(float depthValue);
|
||||||
|
|
||||||
/** clears the texture with a specified stencil value */
|
/** Clears the texture with a specified stencil value.
|
||||||
virtual void clearStencil(int stencilValue);
|
*
|
||||||
/* creates a new Image from with the texture's data.
|
* @param A specified stencil value.
|
||||||
Caller is responsible for releasing it by calling delete.
|
|
||||||
*/
|
*/
|
||||||
|
virtual void clearStencil(int stencilValue);
|
||||||
|
|
||||||
|
/* Creates a new Image from with the texture's data.
|
||||||
|
* Caller is responsible for releasing it by calling delete.
|
||||||
|
*
|
||||||
|
* @param flipImage Whether or not to flip image.
|
||||||
|
* @return An image.
|
||||||
|
*/
|
||||||
Image* newImage(bool flipImage = true);
|
Image* newImage(bool flipImage = true);
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE Image* newCCImage(bool flipImage = true) { return newImage(flipImage); };
|
CC_DEPRECATED_ATTRIBUTE Image* newCCImage(bool flipImage = true) { return newImage(flipImage); };
|
||||||
|
|
||||||
/** saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
|
/** Saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
|
||||||
Returns true if the operation is successful.
|
* Returns true if the operation is successful.
|
||||||
|
*
|
||||||
|
* @param filename The file name.
|
||||||
|
* @param isRGBA The file is RGBA or not.
|
||||||
|
* @param callback When the file is save finished,it will callback this function.
|
||||||
|
* @return Returns true if the operation is successful.
|
||||||
*/
|
*/
|
||||||
bool saveToFile(const std::string& filename, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
|
bool saveToFile(const std::string& filename, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
|
||||||
|
|
||||||
/** saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder.
|
/** saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder.
|
||||||
Returns true if the operation is successful.
|
Returns true if the operation is successful.
|
||||||
Notes: since v3.x, saveToFile will generate a custum command, which will be called in the following render->render().
|
* Notes: since v3.x, saveToFile will generate a custum command, which will be called in the following render->render().
|
||||||
So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash.
|
* So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash.
|
||||||
To solve this, add Director::getInstance()->getRenderer()->render(); after this function.
|
* To solve this, add Director::getInstance()->getRenderer()->render(); after this function.
|
||||||
|
*
|
||||||
|
* @param filename The file name.
|
||||||
|
* @param format The image format.
|
||||||
|
* @param isRGBA The file is RGBA or not.
|
||||||
|
* @param callback When the file is save finished,it will callback this function.
|
||||||
|
* @return Returns true if the operation is successful.
|
||||||
*/
|
*/
|
||||||
bool saveToFile(const std::string& filename, Image::Format format, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
|
bool saveToFile(const std::string& filename, Image::Format format, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
|
||||||
|
|
||||||
/** Listen "come to background" message, and save render texture.
|
/** Listen "come to background" message, and save render texture.
|
||||||
It only has effect on Android.
|
* It only has effect on Android.
|
||||||
|
*
|
||||||
|
* @param event Event Custom.
|
||||||
*/
|
*/
|
||||||
void listenToBackground(EventCustom *event);
|
void listenToBackground(EventCustom *event);
|
||||||
|
|
||||||
/** Listen "come to foreground" message and restore the frame buffer object
|
/** Listen "come to foreground" message and restore the frame buffer object.
|
||||||
It only has effect on Android.
|
* It only has effect on Android.
|
||||||
|
*
|
||||||
|
* @param event Event Custom.
|
||||||
*/
|
*/
|
||||||
void listenToForeground(EventCustom *event);
|
void listenToForeground(EventCustom *event);
|
||||||
|
|
||||||
/** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. */
|
/** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true.
|
||||||
|
*
|
||||||
|
* @return Clear flags.
|
||||||
|
*/
|
||||||
inline unsigned int getClearFlags() const { return _clearFlags; };
|
inline unsigned int getClearFlags() const { return _clearFlags; };
|
||||||
|
|
||||||
|
/** Set flags.
|
||||||
|
*
|
||||||
|
* @param clearFlags Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT.
|
||||||
|
*/
|
||||||
inline void setClearFlags(unsigned int clearFlags) { _clearFlags = clearFlags; };
|
inline void setClearFlags(unsigned int clearFlags) { _clearFlags = clearFlags; };
|
||||||
|
|
||||||
/** Clear color value. Valid only when "autoDraw" is true. */
|
/** Clear color value. Valid only when "autoDraw" is true.
|
||||||
|
*
|
||||||
|
* @return Color value.
|
||||||
|
*/
|
||||||
inline const Color4F& getClearColor() const { return _clearColor; };
|
inline const Color4F& getClearColor() const { return _clearColor; };
|
||||||
|
|
||||||
|
/** Set color value.
|
||||||
|
*
|
||||||
|
* @param clearColor Color value.
|
||||||
|
*/
|
||||||
inline void setClearColor(const Color4F &clearColor) { _clearColor = clearColor; };
|
inline void setClearColor(const Color4F &clearColor) { _clearColor = clearColor; };
|
||||||
|
|
||||||
/** Value for clearDepth. Valid only when "autoDraw" is true. */
|
/** Value for clearDepth. Valid only when "autoDraw" is true.
|
||||||
|
*
|
||||||
|
* @return Value for clearDepth.
|
||||||
|
*/
|
||||||
inline float getClearDepth() const { return _clearDepth; };
|
inline float getClearDepth() const { return _clearDepth; };
|
||||||
|
|
||||||
|
/** Set Value for clearDepth.
|
||||||
|
*
|
||||||
|
* @param clearDepth Value for clearDepth.
|
||||||
|
*/
|
||||||
inline void setClearDepth(float clearDepth) { _clearDepth = clearDepth; };
|
inline void setClearDepth(float clearDepth) { _clearDepth = clearDepth; };
|
||||||
|
|
||||||
/** Value for clear Stencil. Valid only when "autoDraw" is true */
|
/** Value for clear Stencil. Valid only when "autoDraw" is true.
|
||||||
|
*
|
||||||
|
* @return Value for clear Stencil.
|
||||||
|
*/
|
||||||
inline int getClearStencil() const { return _clearStencil; };
|
inline int getClearStencil() const { return _clearStencil; };
|
||||||
|
|
||||||
|
/** Set Value for clear Stencil.
|
||||||
|
*
|
||||||
|
* @param clearStencil Value for clear Stencil.
|
||||||
|
*/
|
||||||
inline void setClearStencil(int clearStencil) { _clearStencil = clearStencil; };
|
inline void setClearStencil(int clearStencil) { _clearStencil = clearStencil; };
|
||||||
|
|
||||||
/** When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
|
/** When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
|
||||||
Will be enabled in the future.
|
* Will be enabled in the future.
|
||||||
|
*
|
||||||
|
* @return Return the autoDraw value.
|
||||||
*/
|
*/
|
||||||
inline bool isAutoDraw() const { return _autoDraw; };
|
inline bool isAutoDraw() const { return _autoDraw; };
|
||||||
|
|
||||||
|
/** Set a valve to control whether or not render its children into the texture automatically.
|
||||||
|
*
|
||||||
|
* @param isAutoDraw Whether or not render its children into the texture automatically.
|
||||||
|
*/
|
||||||
inline void setAutoDraw(bool isAutoDraw) { _autoDraw = isAutoDraw; };
|
inline void setAutoDraw(bool isAutoDraw) { _autoDraw = isAutoDraw; };
|
||||||
|
|
||||||
/** Gets the Sprite being used. */
|
/** Gets the Sprite being used.
|
||||||
|
*
|
||||||
|
* @return A Sprite.
|
||||||
|
*/
|
||||||
inline Sprite* getSprite() const { return _sprite; };
|
inline Sprite* getSprite() const { return _sprite; };
|
||||||
|
|
||||||
/** Sets the Sprite being used. */
|
/** Sets the Sprite being used.
|
||||||
|
*
|
||||||
|
* @param A Sprite.
|
||||||
|
*/
|
||||||
inline void setSprite(Sprite* sprite) {
|
inline void setSprite(Sprite* sprite) {
|
||||||
CC_SAFE_RETAIN(sprite);
|
CC_SAFE_RETAIN(sprite);
|
||||||
CC_SAFE_RELEASE(_sprite);
|
CC_SAFE_RELEASE(_sprite);
|
||||||
|
@ -159,24 +268,41 @@ public:
|
||||||
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
|
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
|
||||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||||
|
|
||||||
//flag: use stack matrix computed from scene hierarchy or generate new modelView and projection matrix
|
/** Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
|
||||||
|
*
|
||||||
|
* @param keepMatrix Wether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
|
||||||
|
*/
|
||||||
void setKeepMatrix(bool keepMatrix);
|
void setKeepMatrix(bool keepMatrix);
|
||||||
/**Used for grab part of screen to a texture.
|
/**Used for grab part of screen to a texture.
|
||||||
//rtBegin: the position of renderTexture on the fullRect
|
* @param rtBegin The position of renderTexture on the fullRect.
|
||||||
//fullRect: the total size of screen
|
* @param fullRect The total size of screen.
|
||||||
//fullViewport: the total viewportSize
|
* @param fullViewport The total viewportSize.
|
||||||
*/
|
*/
|
||||||
void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport);
|
void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// FIXME: should be procted.
|
/** FIXME: should be procted.
|
||||||
// but due to a bug in PowerVR + Android,
|
* but due to a bug in PowerVR + Android,
|
||||||
// the constructor is public again
|
* the constructor is public again.
|
||||||
|
*/
|
||||||
RenderTexture();
|
RenderTexture();
|
||||||
virtual ~RenderTexture();
|
virtual ~RenderTexture();
|
||||||
/** initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */
|
/** Initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid.
|
||||||
|
*
|
||||||
|
* @param w The RenderTexture object width.
|
||||||
|
* @param h The RenderTexture object height.
|
||||||
|
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
|
||||||
|
* @return If successed,it will return true.
|
||||||
|
*/
|
||||||
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format);
|
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format);
|
||||||
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/
|
/** Initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format.
|
||||||
|
*
|
||||||
|
* @param w The RenderTexture object width.
|
||||||
|
* @param h The RenderTexture object height.
|
||||||
|
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
|
||||||
|
* @param depthStencilFormat The depthStencil format.
|
||||||
|
* @return If successed,it will return true.
|
||||||
|
*/
|
||||||
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, GLuint depthStencilFormat);
|
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, GLuint depthStencilFormat);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -39,7 +39,7 @@ THE SOFTWARE.
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup sprite_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -47,41 +47,55 @@ NS_CC_BEGIN
|
||||||
class Sprite;
|
class Sprite;
|
||||||
|
|
||||||
/** SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
|
/** SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
|
||||||
* (often known as "batch draw").
|
* (often known as "batch draw").
|
||||||
*
|
*
|
||||||
* A SpriteBatchNode can reference one and only one texture (one image file, one texture atlas).
|
* A SpriteBatchNode can reference one and only one texture (one image file, one texture atlas).
|
||||||
* Only the Sprites that are contained in that texture can be added to the SpriteBatchNode.
|
* Only the Sprites that are contained in that texture can be added to the SpriteBatchNode.
|
||||||
* All Sprites added to a SpriteBatchNode are drawn in one OpenGL ES draw call.
|
* All Sprites added to a SpriteBatchNode are drawn in one OpenGL ES draw call.
|
||||||
* If the Sprites are not added to a SpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient.
|
* If the Sprites are not added to a SpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Limitations:
|
* Limitations:
|
||||||
* - The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is Sprite or any subclass of Sprite. eg: particles, labels and layer can't be added to a SpriteBatchNode.
|
* - The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is Sprite or any subclass of Sprite. eg: particles, labels and layer can't be added to a SpriteBatchNode.
|
||||||
* - Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a property of the texture, and all the sprites share the same texture.
|
* - Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a property of the texture, and all the sprites share the same texture.
|
||||||
*
|
*
|
||||||
* @since v0.7.1
|
* @since v0.7.1
|
||||||
*/
|
*/
|
||||||
class CC_DLL SpriteBatchNode : public Node, public TextureProtocol
|
class CC_DLL SpriteBatchNode : public Node, public TextureProtocol
|
||||||
{
|
{
|
||||||
static const int DEFAULT_CAPACITY = 29;
|
static const int DEFAULT_CAPACITY = 29;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates a SpriteBatchNode with a texture2d and capacity of children.
|
/** Creates a SpriteBatchNode with a texture2d and capacity of children.
|
||||||
The capacity will be increased in 33% in runtime if it runs out of space.
|
* The capacity will be increased in 33% in runtime if it runs out of space.
|
||||||
|
*
|
||||||
|
* @param tex A texture2d.
|
||||||
|
* @param capacity The capacity of children.
|
||||||
|
* @return Return an autorelease object.
|
||||||
*/
|
*/
|
||||||
static SpriteBatchNode* createWithTexture(Texture2D* tex, ssize_t capacity = DEFAULT_CAPACITY);
|
static SpriteBatchNode* createWithTexture(Texture2D* tex, ssize_t capacity = DEFAULT_CAPACITY);
|
||||||
|
|
||||||
/** creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
|
/** Creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
|
||||||
The capacity will be increased in 33% in runtime if it runs out of space.
|
* The capacity will be increased in 33% in runtime if it runs out of space.
|
||||||
The file will be loaded using the TextureMgr.
|
* The file will be loaded using the TextureMgr.
|
||||||
|
*
|
||||||
|
* @param fileImage A file image (.png, .jpeg, .pvr, etc).
|
||||||
|
* @param capacity The capacity of children.
|
||||||
|
* @return Return an autorelease object.
|
||||||
*/
|
*/
|
||||||
static SpriteBatchNode* create(const std::string& fileImage, ssize_t capacity = DEFAULT_CAPACITY);
|
static SpriteBatchNode* create(const std::string& fileImage, ssize_t capacity = DEFAULT_CAPACITY);
|
||||||
|
|
||||||
|
|
||||||
/** returns the TextureAtlas object */
|
/** Returns the TextureAtlas object.
|
||||||
|
*
|
||||||
|
* @return The TextureAtlas object.
|
||||||
|
*/
|
||||||
inline TextureAtlas* getTextureAtlas() { return _textureAtlas; }
|
inline TextureAtlas* getTextureAtlas() { return _textureAtlas; }
|
||||||
|
|
||||||
/** sets the TextureAtlas object */
|
/** Sets the TextureAtlas object.
|
||||||
|
*
|
||||||
|
* @param textureAtlas The TextureAtlas object.
|
||||||
|
*/
|
||||||
inline void setTextureAtlas(TextureAtlas* textureAtlas)
|
inline void setTextureAtlas(TextureAtlas* textureAtlas)
|
||||||
{
|
{
|
||||||
if (textureAtlas != _textureAtlas)
|
if (textureAtlas != _textureAtlas)
|
||||||
|
@ -92,25 +106,66 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** returns an array with the descendants (children, gran children, etc.).
|
/** Returns an array with the descendants (children, gran children, etc.).
|
||||||
This is specific to BatchNode. In order to use the children, use getChildren() instead */
|
* This is specific to BatchNode. In order to use the children, use getChildren() instead.
|
||||||
|
*
|
||||||
|
* @return An array with the descendants (children, gran children, etc.).
|
||||||
|
*/
|
||||||
inline const std::vector<Sprite*>& getDescendants() const { return _descendants; }
|
inline const std::vector<Sprite*>& getDescendants() const { return _descendants; }
|
||||||
|
|
||||||
|
/** Increase the Atlas Capacity. */
|
||||||
void increaseAtlasCapacity();
|
void increaseAtlasCapacity();
|
||||||
|
|
||||||
/** removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
|
/** Removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
|
||||||
@warning Removing a child from a SpriteBatchNode is very slow
|
*
|
||||||
*/
|
* @param index A certain index.
|
||||||
|
* @param doCleanup Whether or not to cleanup the running actions.
|
||||||
|
* @warning Removing a child from a SpriteBatchNode is very slow.
|
||||||
|
*/
|
||||||
void removeChildAtIndex(ssize_t index, bool doCleanup);
|
void removeChildAtIndex(ssize_t index, bool doCleanup);
|
||||||
|
|
||||||
|
/** Append the child.
|
||||||
|
*
|
||||||
|
* @param sprite A Sprite.
|
||||||
|
*/
|
||||||
void appendChild(Sprite* sprite);
|
void appendChild(Sprite* sprite);
|
||||||
|
|
||||||
|
/** Remove a sprite from Atlas.
|
||||||
|
*
|
||||||
|
* @param sprite A Sprite.
|
||||||
|
*/
|
||||||
void removeSpriteFromAtlas(Sprite *sprite);
|
void removeSpriteFromAtlas(Sprite *sprite);
|
||||||
|
|
||||||
|
/** Rebuild index with a sprite all child.
|
||||||
|
*
|
||||||
|
* @param parent The parent sprite.
|
||||||
|
* @param index The child index.
|
||||||
|
* @return Index.
|
||||||
|
*/
|
||||||
ssize_t rebuildIndexInOrder(Sprite *parent, ssize_t index);
|
ssize_t rebuildIndexInOrder(Sprite *parent, ssize_t index);
|
||||||
|
|
||||||
|
/** Get the Max image block index,in all child.
|
||||||
|
*
|
||||||
|
* @param sprite The parent sprite.
|
||||||
|
* @return Index.
|
||||||
|
*/
|
||||||
ssize_t highestAtlasIndexInChild(Sprite *sprite);
|
ssize_t highestAtlasIndexInChild(Sprite *sprite);
|
||||||
|
|
||||||
|
/** Get the Min image block index,in all child.
|
||||||
|
*
|
||||||
|
* @param sprite The parent sprite.
|
||||||
|
* @return Index.
|
||||||
|
*/
|
||||||
ssize_t lowestAtlasIndexInChild(Sprite *sprite);
|
ssize_t lowestAtlasIndexInChild(Sprite *sprite);
|
||||||
|
|
||||||
|
/** Get the nearest index from the sprite in z.
|
||||||
|
*
|
||||||
|
* @param sprite The parent sprite.
|
||||||
|
* @param z Z order for drawing priority.
|
||||||
|
* @return Index.
|
||||||
|
*/
|
||||||
ssize_t atlasIndexForChild(Sprite *sprite, int z);
|
ssize_t atlasIndexForChild(Sprite *sprite, int z);
|
||||||
/* Sprites use this to start sortChildren, don't call this manually */
|
/* Sprites use this to start sortChildren, don't call this manually. */
|
||||||
void reorderBatch(bool reorder);
|
void reorderBatch(bool reorder);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -121,9 +176,9 @@ public:
|
||||||
virtual void setTexture(Texture2D *texture) override;
|
virtual void setTexture(Texture2D *texture) override;
|
||||||
/**
|
/**
|
||||||
*@code
|
*@code
|
||||||
*When this function bound into js or lua,the parameter will be changed
|
* When this function bound into js or lua,the parameter will be changed.
|
||||||
*In js: var setBlendFunc(var src, var dst)
|
* In js: var setBlendFunc(var src, var dst).
|
||||||
*@endcode
|
* @endcode
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
|
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
|
||||||
|
@ -147,13 +202,13 @@ public:
|
||||||
virtual std::string getDescription() const override;
|
virtual std::string getDescription() const override;
|
||||||
|
|
||||||
/** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
|
/** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
|
||||||
This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
|
* This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
|
||||||
For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont)
|
* For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont).
|
||||||
*/
|
*/
|
||||||
void insertQuadFromSprite(Sprite *sprite, ssize_t index);
|
void insertQuadFromSprite(Sprite *sprite, ssize_t index);
|
||||||
/* This is the opposite of "addQuadFromSprite.
|
/* This is the opposite of "addQuadFromSprite.
|
||||||
It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
* It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
||||||
*/
|
*/
|
||||||
SpriteBatchNode * addSpriteWithoutQuad(Sprite *child, int z, int aTag);
|
SpriteBatchNode * addSpriteWithoutQuad(Sprite *child, int z, int aTag);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -202,7 +257,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of sprite_nodes group
|
// end of sprite_nodes group
|
||||||
/// @}
|
/** @} */
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
|
|
@ -38,43 +38,40 @@ class TMXTilesetInfo;
|
||||||
struct _ccCArray;
|
struct _ccCArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup tilemap_parallax_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief TMXLayer represents the TMX layer.
|
/** @brief TMXLayer represents the TMX layer.
|
||||||
|
* It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas.
|
||||||
It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas.
|
* If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created.
|
||||||
If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created.
|
* The benefits of using Sprite objects as tiles are:
|
||||||
The benefits of using Sprite objects as tiles are:
|
* - tiles (Sprite) can be rotated/scaled/moved with a nice API.
|
||||||
- tiles (Sprite) can be rotated/scaled/moved with a nice API
|
* If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative),
|
||||||
|
* then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth.
|
||||||
If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative),
|
* On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value.
|
||||||
then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth.
|
* Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be:
|
||||||
|
* glAlphaFunc( GL_GREATER, value ).
|
||||||
On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value.
|
* "value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer.
|
||||||
Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be:
|
* The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different
|
||||||
|
* value, like 0.5.
|
||||||
glAlphaFunc( GL_GREATER, value )
|
* For further information, please see the programming guide:
|
||||||
|
* http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
|
||||||
"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer.
|
* @since v0.8.1
|
||||||
The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different
|
* Tiles can have tile flags for additional properties. At the moment only flip horizontal and flip vertical are used. These bit flags are defined in TMXXMLParser.h.
|
||||||
value, like 0.5.
|
* @since 1.1
|
||||||
|
*/
|
||||||
For further information, please see the programming guide:
|
|
||||||
|
|
||||||
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
|
|
||||||
|
|
||||||
@since v0.8.1
|
|
||||||
Tiles can have tile flags for additional properties. At the moment only flip horizontal and flip vertical are used. These bit flags are defined in TMXXMLParser.h.
|
|
||||||
|
|
||||||
@since 1.1
|
|
||||||
*/
|
|
||||||
|
|
||||||
class CC_DLL TMXLayer : public SpriteBatchNode
|
class CC_DLL TMXLayer : public SpriteBatchNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates a TMXLayer with an tileset info, a layer info and a map info */
|
/** Creates a TMXLayer with an tileset info, a layer info and a map info.
|
||||||
|
*
|
||||||
|
* @param tilesetInfo An tileset info.
|
||||||
|
* @param layerInfo A layer info.
|
||||||
|
* @param mapInfo A map info.
|
||||||
|
* @return An autorelease object.
|
||||||
|
*/
|
||||||
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||||
/**
|
/**
|
||||||
* @js ctor
|
* @js ctor
|
||||||
|
@ -86,95 +83,185 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~TMXLayer();
|
virtual ~TMXLayer();
|
||||||
|
|
||||||
/** initializes a TMXLayer with a tileset info, a layer info and a map info */
|
/** Initializes a TMXLayer with a tileset info, a layer info and a map info.
|
||||||
|
*
|
||||||
|
* @param tilesetInfo An tileset info.
|
||||||
|
* @param layerInfo A layer info.
|
||||||
|
* @param mapInfo A map info.
|
||||||
|
* @return If initializes success,it will return true.
|
||||||
|
*/
|
||||||
bool initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
bool initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||||
|
|
||||||
/** dealloc the map that contains the tile position from memory.
|
/** Dealloc the map that contains the tile position from memory.
|
||||||
Unless you want to know at runtime the tiles positions, you can safely call this method.
|
* Unless you want to know at runtime the tiles positions, you can safely call this method.
|
||||||
If you are going to call layer->tileGIDAt() then, don't release the map
|
* If you are going to call layer->tileGIDAt() then, don't release the map.
|
||||||
*/
|
*/
|
||||||
void releaseMap();
|
void releaseMap();
|
||||||
|
|
||||||
/** returns the tile (Sprite) at a given a tile coordinate.
|
/** Returns the tile (Sprite) at a given a tile coordinate.
|
||||||
The returned Sprite will be already added to the TMXLayer. Don't add it again.
|
* The returned Sprite will be already added to the TMXLayer. Don't add it again.
|
||||||
The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
|
* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
|
||||||
You can remove either by calling:
|
* You can remove either by calling:
|
||||||
- layer->removeChild(sprite, cleanup);
|
* - layer->removeChild(sprite, cleanup);
|
||||||
- or layer->removeTileAt(Vec2(x,y));
|
* - or layer->removeTileAt(Vec2(x,y));
|
||||||
*/
|
*
|
||||||
|
* @param tileCoordinate A tile coordinate.
|
||||||
|
* @return Returns the tile (Sprite) at a given a tile coordinate.
|
||||||
|
*/
|
||||||
Sprite* getTileAt(const Vec2& tileCoordinate);
|
Sprite* getTileAt(const Vec2& tileCoordinate);
|
||||||
CC_DEPRECATED_ATTRIBUTE Sprite* tileAt(const Vec2& tileCoordinate) { return getTileAt(tileCoordinate); };
|
CC_DEPRECATED_ATTRIBUTE Sprite* tileAt(const Vec2& tileCoordinate) { return getTileAt(tileCoordinate); };
|
||||||
|
|
||||||
/** returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
/** Returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
||||||
This method requires the the tile map has not been previously released (eg. don't call [layer releaseMap])
|
* This method requires the the tile map has not been previously released (eg. don't call [layer releaseMap]).
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
* @param flags Tile flags.
|
||||||
|
* @return Returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
||||||
*/
|
*/
|
||||||
uint32_t getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
|
uint32_t getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
|
||||||
CC_DEPRECATED_ATTRIBUTE uint32_t tileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr){
|
CC_DEPRECATED_ATTRIBUTE uint32_t tileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr){
|
||||||
return getTileGIDAt(tileCoordinate, flags);
|
return getTileGIDAt(tileCoordinate, flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** sets the tile gid (gid = tile global id) at a given tile coordinate.
|
/** Sets the tile gid (gid = tile global id) at a given tile coordinate.
|
||||||
The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
* The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
||||||
If a tile is already placed at that position, then it will be removed.
|
* If a tile is already placed at that position, then it will be removed.
|
||||||
*/
|
*
|
||||||
|
* @param gid The tile gid.
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
*/
|
||||||
void setTileGID(uint32_t gid, const Vec2& tileCoordinate);
|
void setTileGID(uint32_t gid, const Vec2& tileCoordinate);
|
||||||
|
|
||||||
/** sets the tile gid (gid = tile global id) at a given tile coordinate.
|
/** Sets the tile gid (gid = tile global id) at a given tile coordinate.
|
||||||
The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
* The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1.
|
||||||
If a tile is already placed at that position, then it will be removed.
|
* If a tile is already placed at that position, then it will be removed.
|
||||||
|
* Use withFlags if the tile flags need to be changed as well.
|
||||||
Use withFlags if the tile flags need to be changed as well
|
*
|
||||||
|
* @param gid The tile gid.
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
* @param flags The tile flags.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void setTileGID(uint32_t gid, const Vec2& tileCoordinate, TMXTileFlags flags);
|
void setTileGID(uint32_t gid, const Vec2& tileCoordinate, TMXTileFlags flags);
|
||||||
|
|
||||||
/** removes a tile at given tile coordinate */
|
/** Removes a tile at given tile coordinate.
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
*/
|
||||||
void removeTileAt(const Vec2& tileCoordinate);
|
void removeTileAt(const Vec2& tileCoordinate);
|
||||||
|
|
||||||
/** returns the position in points of a given tile coordinate */
|
/** Returns the position in points of a given tile coordinate.
|
||||||
|
*
|
||||||
|
* @param tileCoordinate The tile coordinate.
|
||||||
|
* @return The position in points of a given tile coordinate.
|
||||||
|
*/
|
||||||
Vec2 getPositionAt(const Vec2& tileCoordinate);
|
Vec2 getPositionAt(const Vec2& tileCoordinate);
|
||||||
CC_DEPRECATED_ATTRIBUTE Vec2 positionAt(const Vec2& tileCoordinate) { return getPositionAt(tileCoordinate); };
|
CC_DEPRECATED_ATTRIBUTE Vec2 positionAt(const Vec2& tileCoordinate) { return getPositionAt(tileCoordinate); };
|
||||||
|
|
||||||
/** return the value for the specific property name */
|
/** Return the value for the specific property name.
|
||||||
|
*
|
||||||
|
* @param propertyName The specific property name.
|
||||||
|
* @return Return the value for the specific property name.
|
||||||
|
*/
|
||||||
Value getProperty(const std::string& propertyName) const;
|
Value getProperty(const std::string& propertyName) const;
|
||||||
CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
|
CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
|
||||||
|
|
||||||
/** Creates the tiles */
|
/** Creates the tiles. */
|
||||||
void setupTiles();
|
void setupTiles();
|
||||||
|
|
||||||
|
/** Get the layer name.
|
||||||
|
*
|
||||||
|
* @return The layer name.
|
||||||
|
*/
|
||||||
inline const std::string& getLayerName(){ return _layerName; }
|
inline const std::string& getLayerName(){ return _layerName; }
|
||||||
|
|
||||||
|
/** Set the layer name.
|
||||||
|
*
|
||||||
|
* @param layerName The layer name.
|
||||||
|
*/
|
||||||
inline void setLayerName(const std::string& layerName){ _layerName = layerName; }
|
inline void setLayerName(const std::string& layerName){ _layerName = layerName; }
|
||||||
|
|
||||||
/** size of the layer in tiles */
|
/** Size of the layer in tiles.
|
||||||
|
*
|
||||||
|
* @return Size of the layer in tiles.
|
||||||
|
*/
|
||||||
inline const Size& getLayerSize() const { return _layerSize; };
|
inline const Size& getLayerSize() const { return _layerSize; };
|
||||||
|
|
||||||
|
/** Set size of the layer in tiles.
|
||||||
|
*
|
||||||
|
* @param size Size of the layer in tiles.
|
||||||
|
*/
|
||||||
inline void setLayerSize(const Size& size) { _layerSize = size; };
|
inline void setLayerSize(const Size& size) { _layerSize = size; };
|
||||||
|
|
||||||
/** size of the map's tile (could be different from the tile's size) */
|
/** Size of the map's tile (could be different from the tile's size).
|
||||||
|
*
|
||||||
|
* @return The size of the map's tile.
|
||||||
|
*/
|
||||||
inline const Size& getMapTileSize() const { return _mapTileSize; };
|
inline const Size& getMapTileSize() const { return _mapTileSize; };
|
||||||
|
|
||||||
|
/** Set the size of the map's tile.
|
||||||
|
*
|
||||||
|
* @param size The size of the map's tile.
|
||||||
|
*/
|
||||||
inline void setMapTileSize(const Size& size) { _mapTileSize = size; };
|
inline void setMapTileSize(const Size& size) { _mapTileSize = size; };
|
||||||
|
|
||||||
/** pointer to the map of tiles
|
/** Pointer to the map of tiles.
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
* @return Pointer to the map of tiles.
|
||||||
*/
|
*/
|
||||||
uint32_t* getTiles() const { return _tiles; };
|
uint32_t* getTiles() const { return _tiles; };
|
||||||
|
|
||||||
|
/** Set a pointer to the map of tiles.
|
||||||
|
*
|
||||||
|
* @param tiles A pointer to the map of tiles.
|
||||||
|
*/
|
||||||
void setTiles(uint32_t* tiles) { _tiles = tiles; };
|
void setTiles(uint32_t* tiles) { _tiles = tiles; };
|
||||||
|
|
||||||
/** Tileset information for the layer */
|
/** Tileset information for the layer.
|
||||||
|
*
|
||||||
|
* @return Tileset information for the layer.
|
||||||
|
*/
|
||||||
inline TMXTilesetInfo* getTileSet() const { return _tileSet; };
|
inline TMXTilesetInfo* getTileSet() const { return _tileSet; };
|
||||||
|
|
||||||
|
/** Set tileset information for the layer.
|
||||||
|
*
|
||||||
|
* @param The tileset information for the layer.
|
||||||
|
*/
|
||||||
inline void setTileSet(TMXTilesetInfo* info) {
|
inline void setTileSet(TMXTilesetInfo* info) {
|
||||||
CC_SAFE_RETAIN(info);
|
CC_SAFE_RETAIN(info);
|
||||||
CC_SAFE_RELEASE(_tileSet);
|
CC_SAFE_RELEASE(_tileSet);
|
||||||
_tileSet = info;
|
_tileSet = info;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Layer orientation, which is the same as the map orientation */
|
/** Layer orientation, which is the same as the map orientation.
|
||||||
|
*
|
||||||
|
* @return Layer orientation, which is the same as the map orientation.
|
||||||
|
*/
|
||||||
inline int getLayerOrientation() const { return _layerOrientation; };
|
inline int getLayerOrientation() const { return _layerOrientation; };
|
||||||
|
|
||||||
|
/** Set layer orientation, which is the same as the map orientation.
|
||||||
|
*
|
||||||
|
* @param orientation Layer orientation,which is the same as the map orientation.
|
||||||
|
*/
|
||||||
inline void setLayerOrientation(int orientation) { _layerOrientation = orientation; };
|
inline void setLayerOrientation(int orientation) { _layerOrientation = orientation; };
|
||||||
|
|
||||||
/** properties from the layer. They can be added using Tiled */
|
/** Properties from the layer. They can be added using Tiled.
|
||||||
|
*
|
||||||
|
* @return Properties from the layer. They can be added using Tiled.
|
||||||
|
*/
|
||||||
inline const ValueMap& getProperties() const { return _properties; };
|
inline const ValueMap& getProperties() const { return _properties; };
|
||||||
|
|
||||||
|
/** Properties from the layer. They can be added using Tiled.
|
||||||
|
*
|
||||||
|
* @return Properties from the layer. They can be added using Tiled.
|
||||||
|
*/
|
||||||
inline ValueMap& getProperties() { return _properties; };
|
inline ValueMap& getProperties() { return _properties; };
|
||||||
|
|
||||||
|
/** Set an Properties from to layer.
|
||||||
|
*
|
||||||
|
* @param properties It is used to set the layer Properties.
|
||||||
|
*/
|
||||||
inline void setProperties(const ValueMap& properties) {
|
inline void setProperties(const ValueMap& properties) {
|
||||||
_properties = properties;
|
_properties = properties;
|
||||||
};
|
};
|
||||||
|
@ -244,7 +331,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of tilemap_parallax_nodes group
|
// end of tilemap_parallax_nodes group
|
||||||
/// @}
|
/** @} */
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,13 @@ THE SOFTWARE.
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup tilemap_parallax_nodes
|
* @addtogroup _2d
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief TMXObjectGroup represents the TMX object group.
|
/** @brief TMXObjectGroup represents the TMX object group.
|
||||||
@since v0.99.0
|
* @since v0.99.0
|
||||||
*/
|
*/
|
||||||
class CC_DLL TMXObjectGroup : public Ref
|
class CC_DLL TMXObjectGroup : public Ref
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -54,42 +54,75 @@ public:
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
virtual ~TMXObjectGroup();
|
virtual ~TMXObjectGroup();
|
||||||
|
|
||||||
|
/** Get the group name.
|
||||||
|
*
|
||||||
|
* @return The group name.
|
||||||
|
*/
|
||||||
inline const std::string& getGroupName() const { return _groupName; }
|
inline const std::string& getGroupName() const { return _groupName; }
|
||||||
|
|
||||||
|
/** Set the group name.
|
||||||
|
*
|
||||||
|
* @param groupname A string,it is used to set the group name.
|
||||||
|
*/
|
||||||
inline void setGroupName(const std::string& groupName){ _groupName = groupName; }
|
inline void setGroupName(const std::string& groupName){ _groupName = groupName; }
|
||||||
|
|
||||||
/** return the value for the specific property name */
|
/** Return the value for the specific property name.
|
||||||
|
*
|
||||||
|
* @param propertyName The specific property name.
|
||||||
|
* @return Return the value for the specific property name.
|
||||||
|
*/
|
||||||
Value getProperty(const std::string& propertyName) const;
|
Value getProperty(const std::string& propertyName) const;
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
|
CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
|
||||||
|
|
||||||
/** return the dictionary for the specific object name.
|
/** Return the dictionary for the specific object name.
|
||||||
It will return the 1st object found on the array for the given name.
|
* It will return the 1st object found on the array for the given name.
|
||||||
*/
|
*
|
||||||
|
* @return Return the dictionary for the specific object name.
|
||||||
|
*/
|
||||||
ValueMap getObject(const std::string& objectName) const;
|
ValueMap getObject(const std::string& objectName) const;
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE ValueMap objectNamed(const std::string& objectName) const { return getObject(objectName); };
|
CC_DEPRECATED_ATTRIBUTE ValueMap objectNamed(const std::string& objectName) const { return getObject(objectName); };
|
||||||
|
|
||||||
/** Gets the offset position of child objects */
|
/** Gets the offset position of child objects.
|
||||||
|
*
|
||||||
|
* @return The offset position of child objects.
|
||||||
|
*/
|
||||||
inline const Vec2& getPositionOffset() const { return _positionOffset; };
|
inline const Vec2& getPositionOffset() const { return _positionOffset; };
|
||||||
|
|
||||||
/** Sets the offset position of child objects */
|
/** Sets the offset position of child objects.
|
||||||
|
*
|
||||||
|
* @param offset The offset position of child objects.
|
||||||
|
*/
|
||||||
inline void setPositionOffset(const Vec2& offset) { _positionOffset = offset; };
|
inline void setPositionOffset(const Vec2& offset) { _positionOffset = offset; };
|
||||||
|
|
||||||
/** Gets the list of properties stored in a dictionary */
|
/** Gets the list of properties stored in a dictionary.
|
||||||
|
*
|
||||||
|
* @return The list of properties stored in a dictionary.
|
||||||
|
*/
|
||||||
inline const ValueMap& getProperties() const { return _properties; };
|
inline const ValueMap& getProperties() const { return _properties; };
|
||||||
inline ValueMap& getProperties() { return _properties; };
|
inline ValueMap& getProperties() { return _properties; };
|
||||||
|
|
||||||
/** Sets the list of properties */
|
/** Sets the list of properties.
|
||||||
|
*
|
||||||
|
* @param properties The list of properties.
|
||||||
|
*/
|
||||||
inline void setProperties(const ValueMap& properties) {
|
inline void setProperties(const ValueMap& properties) {
|
||||||
_properties = properties;
|
_properties = properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Gets the array of the objects */
|
/** Gets the array of the objects.
|
||||||
|
*
|
||||||
|
* @return The array of the objects.
|
||||||
|
*/
|
||||||
inline const ValueVector& getObjects() const { return _objects; };
|
inline const ValueVector& getObjects() const { return _objects; };
|
||||||
inline ValueVector& getObjects() { return _objects; };
|
inline ValueVector& getObjects() { return _objects; };
|
||||||
|
|
||||||
/** Sets the array of the objects */
|
/** Sets the array of the objects.
|
||||||
|
*
|
||||||
|
* @param objects The array of the objects.
|
||||||
|
*/
|
||||||
inline void setObjects(const ValueVector& objects) {
|
inline void setObjects(const ValueVector& objects) {
|
||||||
_objects = objects;
|
_objects = objects;
|
||||||
};
|
};
|
||||||
|
@ -106,7 +139,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of tilemap_parallax_nodes group
|
// end of tilemap_parallax_nodes group
|
||||||
/// @}
|
/** @} */
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
|
|
@ -45,26 +45,33 @@ class ActionInterval;
|
||||||
class Node;
|
class Node;
|
||||||
class NodeGrid;
|
class NodeGrid;
|
||||||
|
|
||||||
/** @brief TransitionEaseScene can ease the actions of the scene protocol.
|
/** @class TransitionEaseScene
|
||||||
|
* @brief TransitionEaseScene can ease the actions of the scene protocol.
|
||||||
@since v0.8.2
|
@since v0.8.2
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionEaseScene// : public Ref
|
class CC_DLL TransitionEaseScene// : public Ref
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Constructor.
|
||||||
|
*/
|
||||||
virtual ~TransitionEaseScene() {}
|
virtual ~TransitionEaseScene() {}
|
||||||
|
|
||||||
/** returns the Ease action that will be performed on a linear action.
|
/** Returns the Ease action that will be performed on a linear action.
|
||||||
@since v0.8.2
|
@since v0.8.2
|
||||||
*/
|
*
|
||||||
|
* @param action A given interval action.
|
||||||
|
* @return The Ease action that will be performed on a linear action.
|
||||||
|
*/
|
||||||
virtual ActionInterval * easeActionWithAction(ActionInterval * action) = 0;
|
virtual ActionInterval * easeActionWithAction(ActionInterval * action) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief Base class for Transition scenes
|
/** @class TransitionScene
|
||||||
|
* @brief Base class for Transition scenes.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionScene : public Scene
|
class CC_DLL TransitionScene : public Scene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Orientation Type used by some transitions
|
/** Orientation Type used by some transitions.
|
||||||
*/
|
*/
|
||||||
enum class Orientation
|
enum class Orientation
|
||||||
{
|
{
|
||||||
|
@ -78,13 +85,20 @@ public:
|
||||||
DOWN_OVER = 1,
|
DOWN_OVER = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** creates a base transition with duration and incoming scene */
|
/** Creates a base transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionScene object.
|
||||||
|
*/
|
||||||
static TransitionScene * create(float t, Scene *scene);
|
static TransitionScene * create(float t, Scene *scene);
|
||||||
|
|
||||||
/** called after the transition finishes */
|
/** Called after the transition finishes.
|
||||||
|
*/
|
||||||
void finish(void);
|
void finish(void);
|
||||||
|
|
||||||
/** used by some transitions to hide the outer scene */
|
/** Used by some transitions to hide the outer scene.
|
||||||
|
*/
|
||||||
void hideOutShowIn(void);
|
void hideOutShowIn(void);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -116,13 +130,20 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionScene);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionScene);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief A Transition that supports orientation like.
|
/** @class TransitionSceneOriented
|
||||||
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
|
* @brief A Transition that supports orientation like.
|
||||||
*/
|
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
|
||||||
|
*/
|
||||||
class CC_DLL TransitionSceneOriented : public TransitionScene
|
class CC_DLL TransitionSceneOriented : public TransitionScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates a base transition with duration and incoming scene */
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @param orientation A given orientation: LeftOver, RightOver, UpOver, DownOver.
|
||||||
|
* @return A autoreleased TransitionSceneOriented object.
|
||||||
|
*/
|
||||||
static TransitionSceneOriented * create(float t,Scene* scene, Orientation orientation);
|
static TransitionSceneOriented * create(float t,Scene* scene, Orientation orientation);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -139,12 +160,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSceneOriented);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSceneOriented);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionRotoZoom:
|
/** @class TransitionRotoZoom
|
||||||
|
* @brief TransitionRotoZoom:
|
||||||
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
|
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionRotoZoom : public TransitionScene
|
class CC_DLL TransitionRotoZoom : public TransitionScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionRotoZoom object.
|
||||||
|
*/
|
||||||
static TransitionRotoZoom* create(float t, Scene* scene);
|
static TransitionRotoZoom* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -161,12 +189,19 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionJumpZoom:
|
/** @class TransitionJumpZoom
|
||||||
|
* @brief TransitionJumpZoom:
|
||||||
Zoom out and jump the outgoing scene, and then jump and zoom in the incoming
|
Zoom out and jump the outgoing scene, and then jump and zoom in the incoming
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionJumpZoom : public TransitionScene
|
class CC_DLL TransitionJumpZoom : public TransitionScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionJumpZoom object.
|
||||||
|
*/
|
||||||
static TransitionJumpZoom* create(float t, Scene* scene);
|
static TransitionJumpZoom* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -182,15 +217,25 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionJumpZoom);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionJumpZoom);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionMoveInL:
|
/** @class TransitionMoveInL
|
||||||
|
* @brief TransitionMoveInL:
|
||||||
Move in from to the left the incoming scene.
|
Move in from to the left the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionMoveInL : public TransitionScene, public TransitionEaseScene
|
class CC_DLL TransitionMoveInL : public TransitionScene, public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionMoveInL object.
|
||||||
|
*/
|
||||||
static TransitionMoveInL* create(float t, Scene* scene);
|
static TransitionMoveInL* create(float t, Scene* scene);
|
||||||
|
|
||||||
/** returns the action that will be performed */
|
/** Returns the action that will be performed.
|
||||||
|
*
|
||||||
|
* @return The action that will be performed.
|
||||||
|
*/
|
||||||
virtual ActionInterval* action(void);
|
virtual ActionInterval* action(void);
|
||||||
|
|
||||||
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
||||||
|
@ -212,12 +257,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInL);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInL);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionMoveInR:
|
/** @class TransitionMoveInR
|
||||||
|
* @brief TransitionMoveInR:
|
||||||
Move in from to the right the incoming scene.
|
Move in from to the right the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionMoveInR : public TransitionMoveInL
|
class CC_DLL TransitionMoveInR : public TransitionMoveInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionMoveInR object.
|
||||||
|
*/
|
||||||
static TransitionMoveInR* create(float t, Scene* scene);
|
static TransitionMoveInR* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -231,12 +283,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInR);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInR);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionMoveInT:
|
/** @class TransitionMoveInT
|
||||||
|
* @brief TransitionMoveInT:
|
||||||
Move in from to the top the incoming scene.
|
Move in from to the top the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionMoveInT : public TransitionMoveInL
|
class CC_DLL TransitionMoveInT : public TransitionMoveInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionMoveInT object.
|
||||||
|
*/
|
||||||
static TransitionMoveInT* create(float t, Scene* scene);
|
static TransitionMoveInT* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -250,12 +309,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInT);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInT);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionMoveInB:
|
/** @class TransitionMoveInB
|
||||||
|
* @brief TransitionMoveInB:
|
||||||
Move in from to the bottom the incoming scene.
|
Move in from to the bottom the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionMoveInB : public TransitionMoveInL
|
class CC_DLL TransitionMoveInB : public TransitionMoveInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionMoveInB object.
|
||||||
|
*/
|
||||||
static TransitionMoveInB* create(float t, Scene* scene);
|
static TransitionMoveInB* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -269,17 +335,27 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInB);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionMoveInB);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSlideInL:
|
/** @class TransitionSlideInL
|
||||||
|
* @brief TransitionSlideInL:
|
||||||
Slide in the incoming scene from the left border.
|
Slide in the incoming scene from the left border.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSlideInL : public TransitionScene, public TransitionEaseScene
|
class CC_DLL TransitionSlideInL : public TransitionScene, public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSlideInL object.
|
||||||
|
*/
|
||||||
static TransitionSlideInL* create(float t, Scene* scene);
|
static TransitionSlideInL* create(float t, Scene* scene);
|
||||||
|
|
||||||
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
||||||
|
|
||||||
/** returns the action that will be performed by the incoming and outgoing scene */
|
/** Returns the action that will be performed by the incoming and outgoing scene.
|
||||||
|
*
|
||||||
|
* @return The action that will be performed by the incoming and outgoing scene.
|
||||||
|
*/
|
||||||
virtual ActionInterval* action(void);
|
virtual ActionInterval* action(void);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -301,15 +377,22 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInL);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInL);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSlideInR:
|
/** @class TransitionSlideInR
|
||||||
|
*@brief TransitionSlideInR:
|
||||||
Slide in the incoming scene from the right border.
|
Slide in the incoming scene from the right border.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSlideInR : public TransitionSlideInL
|
class CC_DLL TransitionSlideInR : public TransitionSlideInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSlideInR object.
|
||||||
|
*/
|
||||||
static TransitionSlideInR* create(float t, Scene* scene);
|
static TransitionSlideInR* create(float t, Scene* scene);
|
||||||
|
|
||||||
/** returns the action that will be performed by the incoming and outgoing scene */
|
/** Returns the action that will be performed by the incoming and outgoing scene. */
|
||||||
virtual ActionInterval* action(void) override;
|
virtual ActionInterval* action(void) override;
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -326,12 +409,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInR);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInR);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSlideInB:
|
/** @class TransitionSlideInB
|
||||||
|
* @brief TransitionSlideInB:
|
||||||
Slide in the incoming scene from the bottom border.
|
Slide in the incoming scene from the bottom border.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSlideInB : public TransitionSlideInL
|
class CC_DLL TransitionSlideInB : public TransitionSlideInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSlideInB object.
|
||||||
|
*/
|
||||||
static TransitionSlideInB* create(float t, Scene* scene);
|
static TransitionSlideInB* create(float t, Scene* scene);
|
||||||
|
|
||||||
/** returns the action that will be performed by the incoming and outgoing scene */
|
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||||
|
@ -351,12 +441,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInB);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInB);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSlideInT:
|
/** @class TransitionSlideInT
|
||||||
|
* @brief TransitionSlideInT:
|
||||||
Slide in the incoming scene from the top border.
|
Slide in the incoming scene from the top border.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSlideInT : public TransitionSlideInL
|
class CC_DLL TransitionSlideInT : public TransitionSlideInL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSlideInT object.
|
||||||
|
*/
|
||||||
static TransitionSlideInT* create(float t, Scene* scene);
|
static TransitionSlideInT* create(float t, Scene* scene);
|
||||||
|
|
||||||
/** returns the action that will be performed by the incoming and outgoing scene */
|
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||||
|
@ -376,12 +473,18 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInT);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSlideInT);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** @class TransitionShrinkGrow
|
||||||
@brief Shrink the outgoing scene while grow the incoming scene
|
* @brief Shrink the outgoing scene while grow the incoming scene
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionShrinkGrow : public TransitionScene , public TransitionEaseScene
|
class CC_DLL TransitionShrinkGrow : public TransitionScene , public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionShrinkGrow object.
|
||||||
|
*/
|
||||||
static TransitionShrinkGrow* create(float t, Scene* scene);
|
static TransitionShrinkGrow* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -402,14 +505,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionShrinkGrow);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionShrinkGrow);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFlipX:
|
/** @class TransitionFlipX
|
||||||
|
* @brief TransitionFlipX:
|
||||||
Flips the screen horizontally.
|
Flips the screen horizontally.
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFlipX : public TransitionSceneOriented
|
class CC_DLL TransitionFlipX : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionFlipX object.
|
||||||
|
*/
|
||||||
static TransitionFlipX* create(float t, Scene* s, Orientation o);
|
static TransitionFlipX* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionFlipX object.
|
||||||
|
*/
|
||||||
static TransitionFlipX* create(float t, Scene* s);
|
static TransitionFlipX* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -429,14 +546,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipX);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipX);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFlipY:
|
/** @class TransitionFlipY
|
||||||
|
* @brief TransitionFlipY:
|
||||||
Flips the screen vertically.
|
Flips the screen vertically.
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFlipY : public TransitionSceneOriented
|
class CC_DLL TransitionFlipY : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionFlipY object.
|
||||||
|
*/
|
||||||
static TransitionFlipY* create(float t, Scene* s, Orientation o);
|
static TransitionFlipY* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionFlipY object.
|
||||||
|
*/
|
||||||
static TransitionFlipY* create(float t, Scene* s);
|
static TransitionFlipY* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -456,14 +587,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipY);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipY);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFlipAngular:
|
/** @class TransitionFlipAngular
|
||||||
|
* @brief TransitionFlipAngular:
|
||||||
Flips the screen half horizontally and half vertically.
|
Flips the screen half horizontally and half vertically.
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFlipAngular : public TransitionSceneOriented
|
class CC_DLL TransitionFlipAngular : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionFlipAngular object.
|
||||||
|
*/
|
||||||
static TransitionFlipAngular* create(float t, Scene* s, Orientation o);
|
static TransitionFlipAngular* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionFlipAngular object.
|
||||||
|
*/
|
||||||
static TransitionFlipAngular* create(float t, Scene* s);
|
static TransitionFlipAngular* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -483,14 +628,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipAngular);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFlipAngular);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionZoomFlipX:
|
/** @class TransitionZoomFlipX
|
||||||
|
* @brief TransitionZoomFlipX:
|
||||||
Flips the screen horizontally doing a zoom out/in
|
Flips the screen horizontally doing a zoom out/in
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionZoomFlipX : public TransitionSceneOriented
|
class CC_DLL TransitionZoomFlipX : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionZoomFlipX object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipX* create(float t, Scene* s, Orientation o);
|
static TransitionZoomFlipX* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionZoomFlipX object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipX* create(float t, Scene* s);
|
static TransitionZoomFlipX* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -510,14 +669,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipX);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipX);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionZoomFlipY:
|
/** @class TransitionZoomFlipY
|
||||||
|
* @brief TransitionZoomFlipY:
|
||||||
Flips the screen vertically doing a little zooming out/in
|
Flips the screen vertically doing a little zooming out/in
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionZoomFlipY : public TransitionSceneOriented
|
class CC_DLL TransitionZoomFlipY : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionZoomFlipY object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipY* create(float t, Scene* s, Orientation o);
|
static TransitionZoomFlipY* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionZoomFlipY object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipY* create(float t, Scene* s);
|
static TransitionZoomFlipY* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -537,14 +710,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipY);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipY);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionZoomFlipAngular:
|
/** @class TransitionZoomFlipAngular
|
||||||
|
* @brief TransitionZoomFlipAngular:
|
||||||
Flips the screen half horizontally and half vertically doing a little zooming out/in.
|
Flips the screen half horizontally and half vertically doing a little zooming out/in.
|
||||||
The front face is the outgoing scene and the back face is the incoming scene.
|
The front face is the outgoing scene and the back face is the incoming scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionZoomFlipAngular : public TransitionSceneOriented
|
class CC_DLL TransitionZoomFlipAngular : public TransitionSceneOriented
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration, incoming scene and orientation.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @param o A given orientation.
|
||||||
|
* @return A autoreleased TransitionZoomFlipAngular object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipAngular* create(float t, Scene* s, Orientation o);
|
static TransitionZoomFlipAngular* create(float t, Scene* s, Orientation o);
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param s A given scene.
|
||||||
|
* @return A autoreleased TransitionZoomFlipAngular object.
|
||||||
|
*/
|
||||||
static TransitionZoomFlipAngular* create(float t, Scene* s);
|
static TransitionZoomFlipAngular* create(float t, Scene* s);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -564,16 +751,28 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipAngular);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionZoomFlipAngular);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFade:
|
/** @class TransitionFade
|
||||||
|
* @brief TransitionFade:
|
||||||
Fade out the outgoing scene and then fade in the incoming scene.'''
|
Fade out the outgoing scene and then fade in the incoming scene.'''
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFade : public TransitionScene
|
class CC_DLL TransitionFade : public TransitionScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates the transition with a duration and with an RGB color
|
/** Creates the transition with a duration and with an RGB color
|
||||||
* Example: FadeTransition::create(2, scene, Color3B(255,0,0); // red color
|
* Example: FadeTransition::create(2, scene, Color3B(255,0,0); // red color
|
||||||
*/
|
*
|
||||||
|
* @param duration Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @param color A given transition color.
|
||||||
|
* @return A autoreleased TransitionFade object.
|
||||||
|
*/
|
||||||
static TransitionFade* create(float duration, Scene* scene, const Color3B& color);
|
static TransitionFade* create(float duration, Scene* scene, const Color3B& color);
|
||||||
|
/** Creates the transition with a duration.
|
||||||
|
*
|
||||||
|
* @param duration Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionFade object.
|
||||||
|
*/
|
||||||
static TransitionFade* create(float duration, Scene* scene);
|
static TransitionFade* create(float duration, Scene* scene);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -604,13 +803,19 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
class RenderTexture;
|
class RenderTexture;
|
||||||
/**
|
/** @class TransitionCrossFade
|
||||||
@brief TransitionCrossFade:
|
@brief TransitionCrossFade:
|
||||||
Cross fades two scenes using the RenderTexture object.
|
Cross fades two scenes using the RenderTexture object.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionCrossFade : public TransitionScene
|
class CC_DLL TransitionCrossFade : public TransitionScene
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionCrossFade object.
|
||||||
|
*/
|
||||||
static TransitionCrossFade* create(float t, Scene* scene);
|
static TransitionCrossFade* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -640,12 +845,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionCrossFade);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionCrossFade);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionTurnOffTiles:
|
/** @class TransitionTurnOffTiles
|
||||||
|
* @brief TransitionTurnOffTiles:
|
||||||
Turn off the tiles of the outgoing scene in random order
|
Turn off the tiles of the outgoing scene in random order
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionTurnOffTiles : public TransitionScene ,public TransitionEaseScene
|
class CC_DLL TransitionTurnOffTiles : public TransitionScene ,public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionTurnOffTiles object.
|
||||||
|
*/
|
||||||
static TransitionTurnOffTiles* create(float t, Scene* scene);
|
static TransitionTurnOffTiles* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -672,14 +884,25 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionTurnOffTiles);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionTurnOffTiles);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSplitCols:
|
/** @class TransitionSplitCols
|
||||||
|
* @brief TransitionSplitCols:
|
||||||
The odd columns goes upwards while the even columns goes downwards.
|
The odd columns goes upwards while the even columns goes downwards.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSplitCols : public TransitionScene , public TransitionEaseScene
|
class CC_DLL TransitionSplitCols : public TransitionScene , public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSplitCols object.
|
||||||
|
*/
|
||||||
static TransitionSplitCols* create(float t, Scene* scene);
|
static TransitionSplitCols* create(float t, Scene* scene);
|
||||||
|
|
||||||
|
/** Returns the action that will be performed.
|
||||||
|
*
|
||||||
|
* @return The action that will be performed.
|
||||||
|
*/
|
||||||
virtual ActionInterval* action();
|
virtual ActionInterval* action();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -705,12 +928,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSplitCols);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSplitCols);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionSplitRows:
|
/** @class TransitionSplitRows
|
||||||
|
* @brief TransitionSplitRows:
|
||||||
The odd rows goes to the left while the even rows goes to the right.
|
The odd rows goes to the left while the even rows goes to the right.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionSplitRows : public TransitionSplitCols
|
class CC_DLL TransitionSplitRows : public TransitionSplitCols
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionSplitRows object.
|
||||||
|
*/
|
||||||
static TransitionSplitRows* create(float t, Scene* scene);
|
static TransitionSplitRows* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -726,14 +956,26 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSplitRows);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionSplitRows);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFadeTR:
|
/** @class TransitionFadeTR
|
||||||
|
* @brief TransitionFadeTR:
|
||||||
Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.
|
Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFadeTR : public TransitionScene , public TransitionEaseScene
|
class CC_DLL TransitionFadeTR : public TransitionScene , public TransitionEaseScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionFadeTR object.
|
||||||
|
*/
|
||||||
static TransitionFadeTR* create(float t, Scene* scene);
|
static TransitionFadeTR* create(float t, Scene* scene);
|
||||||
|
|
||||||
|
/** Returns the action that will be performed with size.
|
||||||
|
*
|
||||||
|
* @param size A given size.
|
||||||
|
* @return The action that will be performed.
|
||||||
|
*/
|
||||||
virtual ActionInterval* actionWithSize(const Size& size);
|
virtual ActionInterval* actionWithSize(const Size& size);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -761,12 +1003,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeTR);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeTR);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFadeBL:
|
/** @class TransitionFadeBL
|
||||||
|
* @brief TransitionFadeBL:
|
||||||
Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.
|
Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFadeBL : public TransitionFadeTR
|
class CC_DLL TransitionFadeBL : public TransitionFadeTR
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionFadeBL object.
|
||||||
|
*/
|
||||||
static TransitionFadeBL* create(float t, Scene* scene);
|
static TransitionFadeBL* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -782,12 +1031,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeBL);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeBL);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFadeUp:
|
/** @class TransitionFadeUp
|
||||||
|
* @brief TransitionFadeUp:
|
||||||
* Fade the tiles of the outgoing scene from the bottom to the top.
|
* Fade the tiles of the outgoing scene from the bottom to the top.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFadeUp : public TransitionFadeTR
|
class CC_DLL TransitionFadeUp : public TransitionFadeTR
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionFadeUp object.
|
||||||
|
*/
|
||||||
static TransitionFadeUp* create(float t, Scene* scene);
|
static TransitionFadeUp* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -803,12 +1059,19 @@ private:
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeUp);
|
CC_DISALLOW_COPY_AND_ASSIGN(TransitionFadeUp);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief TransitionFadeDown:
|
/** @class TransitionFadeDown
|
||||||
|
* @brief TransitionFadeDown:
|
||||||
* Fade the tiles of the outgoing scene from the top to the bottom.
|
* Fade the tiles of the outgoing scene from the top to the bottom.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionFadeDown : public TransitionFadeTR
|
class CC_DLL TransitionFadeDown : public TransitionFadeTR
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return A autoreleased TransitionFadeDown object.
|
||||||
|
*/
|
||||||
static TransitionFadeDown* create(float t, Scene* scene);
|
static TransitionFadeDown* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -39,8 +39,8 @@ class NodeGrid;
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/** @class TransitionPageTurn
|
||||||
@brief A transition which peels back the bottom right hand corner of a scene
|
* @brief A transition which peels back the bottom right hand corner of a scene
|
||||||
to transition to the scene beneath it simulating a page turn.
|
to transition to the scene beneath it simulating a page turn.
|
||||||
|
|
||||||
This uses a 3DAction so it's strongly recommended that depth buffering
|
This uses a 3DAction so it's strongly recommended that depth buffering
|
||||||
|
@ -57,6 +57,11 @@ public:
|
||||||
* Creates a base transition with duration and incoming scene.
|
* Creates a base transition with duration and incoming scene.
|
||||||
* If back is true then the effect is reversed to appear as if the incoming
|
* If back is true then the effect is reversed to appear as if the incoming
|
||||||
* scene is being turned from left over the outgoing scene.
|
* scene is being turned from left over the outgoing scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.
|
||||||
|
* @return An autoreleased TransitionPageTurn object.
|
||||||
*/
|
*/
|
||||||
static TransitionPageTurn* create(float t,Scene* scene,bool backwards);
|
static TransitionPageTurn* create(float t,Scene* scene,bool backwards);
|
||||||
|
|
||||||
|
@ -66,12 +71,22 @@ public:
|
||||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a base transition with duration and incoming scene.
|
* Creates a base transition with duration and incoming scene.
|
||||||
* If back is true then the effect is reversed to appear as if the incoming
|
* If back is true then the effect is reversed to appear as if the incoming
|
||||||
* scene is being turned from left over the outgoing scene.
|
* scene is being turned from left over the outgoing scene.
|
||||||
*/
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.
|
||||||
|
* @return True if initialize success.
|
||||||
|
*/
|
||||||
bool initWithDuration(float t,Scene* scene,bool backwards);
|
bool initWithDuration(float t,Scene* scene,bool backwards);
|
||||||
|
|
||||||
|
/** Returns the action that will be performed with size.
|
||||||
|
*
|
||||||
|
* @param size A given size.
|
||||||
|
* @return The action that will be performed.
|
||||||
|
*/
|
||||||
ActionInterval* actionWithSize(const Size& vector);
|
ActionInterval* actionWithSize(const Size& vector);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -39,9 +39,18 @@ class RenderTexture;
|
||||||
* @addtogroup transition
|
* @addtogroup transition
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
/** @class TransitionProgress
|
||||||
|
* @brief A base class of progress transition.
|
||||||
|
*/
|
||||||
class CC_DLL TransitionProgress : public TransitionScene
|
class CC_DLL TransitionProgress : public TransitionScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgress object.
|
||||||
|
*/
|
||||||
static TransitionProgress* create(float t, Scene* scene);
|
static TransitionProgress* create(float t, Scene* scene);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -68,12 +77,19 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/** TransitionRadialCCW transition.
|
/** @class TransitionProgressRadialCCW
|
||||||
|
* @brief TransitionRadialCCW transition.
|
||||||
A counter clock-wise radial transition to the next scene
|
A counter clock-wise radial transition to the next scene
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionProgressRadialCCW : public TransitionProgress
|
class CC_DLL TransitionProgressRadialCCW : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressRadialCCW object.
|
||||||
|
*/
|
||||||
static TransitionProgressRadialCCW* create(float t, Scene* scene);
|
static TransitionProgressRadialCCW* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -92,12 +108,19 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/** TransitionRadialCW transition.
|
/** @class TransitionProgressRadialCW
|
||||||
A counter clock-wise radial transition to the next scene
|
* @brief TransitionRadialCW transition.
|
||||||
|
A counter clock-wise radial transition to the next scene.
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionProgressRadialCW : public TransitionProgress
|
class CC_DLL TransitionProgressRadialCW : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressRadialCW object.
|
||||||
|
*/
|
||||||
static TransitionProgressRadialCW* create(float t, Scene* scene);
|
static TransitionProgressRadialCW* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -115,12 +138,19 @@ protected:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** TransitionProgressHorizontal transition.
|
/** @class TransitionProgressHorizontal
|
||||||
|
* @brief TransitionProgressHorizontal transition.
|
||||||
A clock-wise radial transition to the next scene
|
A clock-wise radial transition to the next scene
|
||||||
*/
|
*/
|
||||||
class CC_DLL TransitionProgressHorizontal : public TransitionProgress
|
class CC_DLL TransitionProgressHorizontal : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressHorizontal object.
|
||||||
|
*/
|
||||||
static TransitionProgressHorizontal* create(float t, Scene* scene);
|
static TransitionProgressHorizontal* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -137,9 +167,18 @@ protected:
|
||||||
virtual ProgressTimer* progressTimerNodeWithRenderTexture(RenderTexture* texture) override;
|
virtual ProgressTimer* progressTimerNodeWithRenderTexture(RenderTexture* texture) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @class TransitionProgressVertical
|
||||||
|
* @brief TransitionProgressVertical transition.
|
||||||
|
*/
|
||||||
class CC_DLL TransitionProgressVertical : public TransitionProgress
|
class CC_DLL TransitionProgressVertical : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressVertical object.
|
||||||
|
*/
|
||||||
static TransitionProgressVertical* create(float t, Scene* scene);
|
static TransitionProgressVertical* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -156,9 +195,18 @@ protected:
|
||||||
virtual ProgressTimer* progressTimerNodeWithRenderTexture(RenderTexture* texture) override;
|
virtual ProgressTimer* progressTimerNodeWithRenderTexture(RenderTexture* texture) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @class TransitionProgressInOut
|
||||||
|
* @brief TransitionProgressInOut transition.
|
||||||
|
*/
|
||||||
class CC_DLL TransitionProgressInOut : public TransitionProgress
|
class CC_DLL TransitionProgressInOut : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressInOut object.
|
||||||
|
*/
|
||||||
static TransitionProgressInOut* create(float t, Scene* scene);
|
static TransitionProgressInOut* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
@ -177,9 +225,18 @@ protected:
|
||||||
virtual void setupTransition() override;
|
virtual void setupTransition() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @class TransitionProgressOutIn
|
||||||
|
* @brief TransitionProgressOutIn transition.
|
||||||
|
*/
|
||||||
class CC_DLL TransitionProgressOutIn : public TransitionProgress
|
class CC_DLL TransitionProgressOutIn : public TransitionProgress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Creates a transition with duration and incoming scene.
|
||||||
|
*
|
||||||
|
* @param t Duration time, in seconds.
|
||||||
|
* @param scene A given scene.
|
||||||
|
* @return An autoreleased TransitionProgressOutIn object.
|
||||||
|
*/
|
||||||
static TransitionProgressOutIn* create(float t, Scene* scene);
|
static TransitionProgressOutIn* create(float t, Scene* scene);
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Axis Aligned Bounding Box (AABB), usually caculate some rough but fast collision detection.
|
||||||
|
*/
|
||||||
class CC_DLL AABB
|
class CC_DLL AABB
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -90,10 +93,13 @@ public:
|
||||||
void set(const Vec3& min, const Vec3& max);
|
void set(const Vec3& min, const Vec3& max);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reset min and max value.
|
* Reset min and max value.If you invoke this method, isEmpty() shall return true.
|
||||||
*/
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check the AABB object is empty(reset).
|
||||||
|
*/
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,6 +48,7 @@ public:
|
||||||
*/
|
*/
|
||||||
static AttachNode* create(Bone3D* attachBone);
|
static AttachNode* create(Bone3D* attachBone);
|
||||||
|
|
||||||
|
//override
|
||||||
virtual Mat4 getWorldToNodeTransform() const override;
|
virtual Mat4 getWorldToNodeTransform() const override;
|
||||||
virtual Mat4 getNodeToWorldTransform() const override;
|
virtual Mat4 getNodeToWorldTransform() const override;
|
||||||
virtual const Mat4& getNodeToParentTransform() const override;
|
virtual const Mat4& getNodeToParentTransform() const override;
|
||||||
|
|
|
@ -102,6 +102,9 @@ CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* calculate a model matrix which keep orignal translate & scaling but always face to the camera
|
||||||
|
*/
|
||||||
bool calculateBillbaordTransform();
|
bool calculateBillbaordTransform();
|
||||||
|
|
||||||
Mat4 _camWorldMat;
|
Mat4 _camWorldMat;
|
||||||
|
|
|
@ -42,7 +42,9 @@ class Data;
|
||||||
class CC_DLL Bundle3D
|
class CC_DLL Bundle3D
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// create a new bundle, destroy it when finish using it
|
/**
|
||||||
|
* create a new bundle, destroy it when finish using it
|
||||||
|
*/
|
||||||
static Bundle3D* createBundle();
|
static Bundle3D* createBundle();
|
||||||
|
|
||||||
static void destroyBundle(Bundle3D* bundle);
|
static void destroyBundle(Bundle3D* bundle);
|
||||||
|
|
|
@ -129,6 +129,10 @@ struct MeshData
|
||||||
int attribCount;
|
int attribCount;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get per vertex size
|
||||||
|
* @return return the sum of each vertex's all attribute size.
|
||||||
|
*/
|
||||||
int getPerVertexSize() const
|
int getPerVertexSize() const
|
||||||
{
|
{
|
||||||
int vertexsize = 0;
|
int vertexsize = 0;
|
||||||
|
@ -138,6 +142,10 @@ public:
|
||||||
}
|
}
|
||||||
return vertexsize;
|
return vertexsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the data
|
||||||
|
*/
|
||||||
void resetData()
|
void resetData()
|
||||||
{
|
{
|
||||||
vertex.clear();
|
vertex.clear();
|
||||||
|
|
|
@ -109,6 +109,11 @@ public:
|
||||||
* first read length, then read string text
|
* first read length, then read string text
|
||||||
*/
|
*/
|
||||||
std::string readString();
|
std::string readString();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the matrix.
|
||||||
|
* @note the matrix type must be the 4*4 float matrix
|
||||||
|
*/
|
||||||
bool readMatrix(float* m);
|
bool readMatrix(float* m);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -34,6 +34,11 @@
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class Camera;
|
class Camera;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the frustum is a six-side geometry, usually use the frustum to do fast-culling:
|
||||||
|
* check a entity whether is a potential visible entity
|
||||||
|
*/
|
||||||
class CC_DLL Frustum
|
class CC_DLL Frustum
|
||||||
{
|
{
|
||||||
friend class Camera;
|
friend class Camera;
|
||||||
|
|
|
@ -196,7 +196,7 @@ void Mesh::setSkin(MeshSkin* skin)
|
||||||
CC_SAFE_RETAIN(skin);
|
CC_SAFE_RETAIN(skin);
|
||||||
CC_SAFE_RELEASE(_skin);
|
CC_SAFE_RELEASE(_skin);
|
||||||
_skin = skin;
|
_skin = skin;
|
||||||
calcuateAABB();
|
calculateAABB();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ void Mesh::setMeshIndexData(MeshIndexData* subMesh)
|
||||||
CC_SAFE_RETAIN(subMesh);
|
CC_SAFE_RETAIN(subMesh);
|
||||||
CC_SAFE_RELEASE(_meshIndexData);
|
CC_SAFE_RELEASE(_meshIndexData);
|
||||||
_meshIndexData = subMesh;
|
_meshIndexData = subMesh;
|
||||||
calcuateAABB();
|
calculateAABB();
|
||||||
bindMeshCommand();
|
bindMeshCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ void Mesh::setGLProgramState(GLProgramState* glProgramState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mesh::calcuateAABB()
|
void Mesh::calculateAABB()
|
||||||
{
|
{
|
||||||
if (_meshIndexData)
|
if (_meshIndexData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,11 +110,20 @@ CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
||||||
Mesh();
|
Mesh();
|
||||||
virtual ~Mesh();
|
virtual ~Mesh();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the default GL program.
|
||||||
|
*/
|
||||||
GLProgram* getDefaultGLProgram(bool textured);
|
GLProgram* getDefaultGLProgram(bool textured);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the default GL program.
|
||||||
|
*/
|
||||||
void setGLProgramState(GLProgramState* glProgramState);
|
void setGLProgramState(GLProgramState* glProgramState);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the MeshCommand.
|
||||||
|
*/
|
||||||
MeshCommand& getMeshCommand() { return _meshCommand; }
|
MeshCommand& getMeshCommand() { return _meshCommand; }
|
||||||
|
|
||||||
/**skin setter*/
|
/**skin setter*/
|
||||||
|
@ -124,8 +133,15 @@ CC_CONSTRUCTOR_ACCESS:
|
||||||
/**name setter*/
|
/**name setter*/
|
||||||
void setName(const std::string& name) { _name = name; }
|
void setName(const std::string& name) { _name = name; }
|
||||||
|
|
||||||
void calcuateAABB();
|
/**
|
||||||
|
* calculate the AABB of the mesh
|
||||||
|
* @note the AABB is in the local space, not the world space
|
||||||
|
*/
|
||||||
|
void calculateAABB();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bind to the MeshCommand
|
||||||
|
*/
|
||||||
void bindMeshCommand();
|
void bindMeshCommand();
|
||||||
protected:
|
protected:
|
||||||
Texture2D* _texture; //texture that submesh is using
|
Texture2D* _texture; //texture that submesh is using
|
||||||
|
|
|
@ -43,6 +43,10 @@ NS_CC_BEGIN
|
||||||
|
|
||||||
class MeshVertexData;
|
class MeshVertexData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the MeshIndexData class.
|
||||||
|
* @brief the MeshIndexData contain all of the indices data which mesh need.
|
||||||
|
*/
|
||||||
class MeshIndexData : public Ref
|
class MeshIndexData : public Ref
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -84,6 +88,10 @@ protected:
|
||||||
friend class Sprite3D;
|
friend class Sprite3D;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the MeshVertexData class.
|
||||||
|
* @brief the MeshIndexData contain all of the vertices data which mesh need.
|
||||||
|
*/
|
||||||
class MeshVertexData : public Ref
|
class MeshVertexData : public Ref
|
||||||
{
|
{
|
||||||
friend class Sprite3D;
|
friend class Sprite3D;
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oritened Bounding Box(OBB)
|
||||||
|
* @brief the OBB is similar to the AABB but the bounding box has the same direction as Sprite3D. so it's collistion detection more precise than AABB
|
||||||
|
*/
|
||||||
class CC_DLL OBB
|
class CC_DLL OBB
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -16,9 +16,16 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* .obj file Loader
|
||||||
|
**/
|
||||||
class ObjLoader
|
class ObjLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* model's material struct
|
||||||
|
**/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
@ -41,11 +48,17 @@ public:
|
||||||
std::map<std::string, std::string> unknown_parameter;
|
std::map<std::string, std::string> unknown_parameter;
|
||||||
} material_t;
|
} material_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* model's indices struct
|
||||||
|
**/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::vector<unsigned short> indices;
|
std::vector<unsigned short> indices;
|
||||||
} mesh_t;
|
} mesh_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* model's shape struct
|
||||||
|
**/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
@ -53,6 +66,9 @@ public:
|
||||||
mesh_t mesh;
|
mesh_t mesh;
|
||||||
} shape_t;
|
} shape_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* model's shapes struct
|
||||||
|
**/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
std::vector<float> positions;
|
std::vector<float> positions;
|
||||||
|
@ -70,11 +86,13 @@ public:
|
||||||
}
|
}
|
||||||
}shapes_t;
|
}shapes_t;
|
||||||
|
|
||||||
/// Loads .obj from a file.
|
/**
|
||||||
/// 'shapes' will be filled with parsed shape data
|
* Loads .obj from a file.
|
||||||
/// The function returns error string.
|
* @param shapes will be filled with parsed shape data
|
||||||
/// Returns empty string when loading .obj success.
|
* @param filename the .obj file path .
|
||||||
/// 'mtl_basepath' is optional, and used for base path for .mtl file.
|
* @param mtl_basepath It's optional, and used for base path for .mtl file
|
||||||
|
* @return The function returns error string, return empty string when loading .obj success.
|
||||||
|
*/
|
||||||
static std::string LoadObj(
|
static std::string LoadObj(
|
||||||
shapes_t& shapes, // [output]
|
shapes_t& shapes, // [output]
|
||||||
const char* filename,
|
const char* filename,
|
||||||
|
|
|
@ -37,6 +37,9 @@ enum class PointSide
|
||||||
BEHIND_PLANE,
|
BEHIND_PLANE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines plane
|
||||||
|
**/
|
||||||
class CC_DLL Plane
|
class CC_DLL Plane
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -96,8 +99,8 @@ public:
|
||||||
PointSide getSide(const Vec3& point) const;
|
PointSide getSide(const Vec3& point) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Vec3 _normal;
|
Vec3 _normal; // the normal line of the plane
|
||||||
float _dist;
|
float _dist; // original displacement of the normal
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ray is a line with one end. usually use it to check intersects with some object,such as Plane, OBB, AABB
|
||||||
|
**/
|
||||||
class CC_DLL Ray
|
class CC_DLL Ray
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -118,7 +118,10 @@ public:
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
* the BoneBlendState struct
|
||||||
|
* @brief store the transformation and weight for bone blending
|
||||||
|
*/
|
||||||
struct BoneBlendState
|
struct BoneBlendState
|
||||||
{
|
{
|
||||||
Vec3 localTranslate;
|
Vec3 localTranslate;
|
||||||
|
|
|
@ -233,6 +233,10 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
/**
|
||||||
|
* Sprite3DCache
|
||||||
|
* @brief the cache data of Sprite3D, use to speed up Sprite3D::create
|
||||||
|
*/
|
||||||
class CC_DLL Sprite3DCache
|
class CC_DLL Sprite3DCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -256,13 +260,17 @@ public:
|
||||||
/**get & destroy*/
|
/**get & destroy*/
|
||||||
static Sprite3DCache* getInstance();
|
static Sprite3DCache* getInstance();
|
||||||
static void destroyInstance();
|
static void destroyInstance();
|
||||||
|
|
||||||
|
/**get the SpriteData struct*/
|
||||||
Sprite3DData* getSpriteData(const std::string& key) const;
|
Sprite3DData* getSpriteData(const std::string& key) const;
|
||||||
|
|
||||||
|
/**add the SpriteData into Sprite3D by given the specified key*/
|
||||||
bool addSprite3DData(const std::string& key, Sprite3DData* spritedata);
|
bool addSprite3DData(const std::string& key, Sprite3DData* spritedata);
|
||||||
|
|
||||||
|
/**remove the SpriteData from Sprite3D by given the specified key*/
|
||||||
void removeSprite3DData(const std::string& key);
|
void removeSprite3DData(const std::string& key);
|
||||||
|
|
||||||
|
/**remove all the SpriteData from Sprite3D*/
|
||||||
void removeAllSprite3DData();
|
void removeAllSprite3DData();
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
|
@ -36,37 +36,68 @@ NS_CC_BEGIN
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @class Touch
|
||||||
|
* @brief Encapsulates the Touch information, such as touch point, id and so on,
|
||||||
|
and provides the methods that commonly used.
|
||||||
|
*/
|
||||||
class CC_DLL Touch : public Ref
|
class CC_DLL Touch : public Ref
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** how the touches are dispathced */
|
/** Dispatch mode, how the touches are dispathced. */
|
||||||
enum class DispatchMode {
|
enum class DispatchMode {
|
||||||
/** All at once */
|
ALL_AT_ONCE, /** All at once. */
|
||||||
ALL_AT_ONCE,
|
ONE_BY_ONE, /** One by one. */
|
||||||
/** one by one */
|
|
||||||
ONE_BY_ONE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Constructor.
|
||||||
|
*/
|
||||||
Touch()
|
Touch()
|
||||||
: _id(0),
|
: _id(0),
|
||||||
_startPointCaptured(false)
|
_startPointCaptured(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/** returns the current touch location in OpenGL coordinates */
|
/** Returns the current touch location in OpenGL coordinates.
|
||||||
|
*
|
||||||
|
* @return The current touch location in OpenGL coordinates.
|
||||||
|
*/
|
||||||
Vec2 getLocation() const;
|
Vec2 getLocation() const;
|
||||||
/** returns the previous touch location in OpenGL coordinates */
|
/** Returns the previous touch location in OpenGL coordinates.
|
||||||
|
*
|
||||||
|
* @return The previous touch location in OpenGL coordinates.
|
||||||
|
*/
|
||||||
Vec2 getPreviousLocation() const;
|
Vec2 getPreviousLocation() const;
|
||||||
/** returns the start touch location in OpenGL coordinates */
|
/** Returns the start touch location in OpenGL coordinates.
|
||||||
|
*
|
||||||
|
* @return The start touch location in OpenGL coordinates.
|
||||||
|
*/
|
||||||
Vec2 getStartLocation() const;
|
Vec2 getStartLocation() const;
|
||||||
/** returns the delta of 2 current touches locations in screen coordinates */
|
/** Returns the delta of 2 current touches locations in screen coordinates.
|
||||||
|
*
|
||||||
|
* @return The delta of 2 current touches locations in screen coordinates.
|
||||||
|
*/
|
||||||
Vec2 getDelta() const;
|
Vec2 getDelta() const;
|
||||||
/** returns the current touch location in screen coordinates */
|
/** Returns the current touch location in screen coordinates.
|
||||||
|
*
|
||||||
|
* @return The current touch location in screen coordinates.
|
||||||
|
*/
|
||||||
Vec2 getLocationInView() const;
|
Vec2 getLocationInView() const;
|
||||||
/** returns the previous touch location in screen coordinates */
|
/** Returns the previous touch location in screen coordinates.
|
||||||
|
*
|
||||||
|
* @return The previous touch location in screen coordinates.
|
||||||
|
*/
|
||||||
Vec2 getPreviousLocationInView() const;
|
Vec2 getPreviousLocationInView() const;
|
||||||
/** returns the start touch location in screen coordinates */
|
/** Returns the start touch location in screen coordinates.
|
||||||
|
*
|
||||||
|
* @return The start touch location in screen coordinates.
|
||||||
|
*/
|
||||||
Vec2 getStartLocationInView() const;
|
Vec2 getStartLocationInView() const;
|
||||||
|
|
||||||
|
/** Set the touch infomation. It always used to monitor touch event.
|
||||||
|
*
|
||||||
|
* @param id A given id
|
||||||
|
* @param x A given x coordinate.
|
||||||
|
* @param y A given y coordinate.
|
||||||
|
*/
|
||||||
void setTouchInfo(int id, float x, float y)
|
void setTouchInfo(int id, float x, float y)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
|
@ -80,9 +111,11 @@ public:
|
||||||
_prevPoint = _point;
|
_prevPoint = _point;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/** Get touch id.
|
||||||
* @js getId
|
* @js getId
|
||||||
* @lua getId
|
* @lua getId
|
||||||
|
*
|
||||||
|
* @return The id of touch.
|
||||||
*/
|
*/
|
||||||
int getID() const
|
int getID() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,94 +43,169 @@ CC_DLL extern const ValueVector ValueVectorNull;
|
||||||
CC_DLL extern const ValueMap ValueMapNull;
|
CC_DLL extern const ValueMap ValueMapNull;
|
||||||
CC_DLL extern const ValueMapIntKey ValueMapIntKeyNull;
|
CC_DLL extern const ValueMapIntKey ValueMapIntKeyNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is provide as a wrapper of basic types, such as int and bool.
|
||||||
|
*/
|
||||||
class CC_DLL Value
|
class CC_DLL Value
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** A predefined Value that has not value. */
|
||||||
static const Value Null;
|
static const Value Null;
|
||||||
|
|
||||||
|
/** Default constructor. */
|
||||||
Value();
|
Value();
|
||||||
|
|
||||||
|
/** Create a Value by an unsigned char value. */
|
||||||
explicit Value(unsigned char v);
|
explicit Value(unsigned char v);
|
||||||
|
|
||||||
|
/** Create a Value by an integer value. */
|
||||||
explicit Value(int v);
|
explicit Value(int v);
|
||||||
|
|
||||||
|
/** Create a Value by a float value. */
|
||||||
explicit Value(float v);
|
explicit Value(float v);
|
||||||
|
|
||||||
|
/** Create a Value by a double value. */
|
||||||
explicit Value(double v);
|
explicit Value(double v);
|
||||||
|
|
||||||
|
/** Create a Value by a bool value. */
|
||||||
explicit Value(bool v);
|
explicit Value(bool v);
|
||||||
|
|
||||||
|
/** Create a Value by a char pointer. It will copy the chars internally. */
|
||||||
explicit Value(const char* v);
|
explicit Value(const char* v);
|
||||||
|
|
||||||
|
/** Create a Value by a string. */
|
||||||
explicit Value(const std::string& v);
|
explicit Value(const std::string& v);
|
||||||
|
|
||||||
|
/** Create a Value by a ValueVector object. */
|
||||||
explicit Value(const ValueVector& v);
|
explicit Value(const ValueVector& v);
|
||||||
|
/** Create a Value by a ValueVector object. It will use std::move internally. */
|
||||||
explicit Value(ValueVector&& v);
|
explicit Value(ValueVector&& v);
|
||||||
|
|
||||||
|
/** Create a Value by a ValueMap object. */
|
||||||
explicit Value(const ValueMap& v);
|
explicit Value(const ValueMap& v);
|
||||||
explicit Value(ValueMap&& v);
|
/** Create a Value by a ValueMap object. It will use std::move internally. */
|
||||||
|
explicit Value(ValueMap&& v);
|
||||||
|
|
||||||
|
/** Create a Value by a ValueMapIntKey object. */
|
||||||
explicit Value(const ValueMapIntKey& v);
|
explicit Value(const ValueMapIntKey& v);
|
||||||
|
/** Create a Value by a ValueMapIntKey object. It will use std::move internally. */
|
||||||
explicit Value(ValueMapIntKey&& v);
|
explicit Value(ValueMapIntKey&& v);
|
||||||
|
|
||||||
|
/** Create a Value by anthoer Value object. */
|
||||||
Value(const Value& other);
|
Value(const Value& other);
|
||||||
|
/** Create a Value by a Value object. It will use std::move internally. */
|
||||||
Value(Value&& other);
|
Value(Value&& other);
|
||||||
|
|
||||||
|
/** Destructor. */
|
||||||
~Value();
|
~Value();
|
||||||
|
|
||||||
// assignment operator
|
/** Assignment operator, assign from Value to Value. */
|
||||||
Value& operator= (const Value& other);
|
Value& operator= (const Value& other);
|
||||||
|
/** Assignment operator, assign from Value to Value. It will use std::move internally. */
|
||||||
Value& operator= (Value&& other);
|
Value& operator= (Value&& other);
|
||||||
|
|
||||||
|
/** Assignment operator, assign from unsigned char to Value. */
|
||||||
Value& operator= (unsigned char v);
|
Value& operator= (unsigned char v);
|
||||||
|
/** Assignment operator, assign from integer to Value. */
|
||||||
Value& operator= (int v);
|
Value& operator= (int v);
|
||||||
|
/** Assignment operator, assign from float to Value. */
|
||||||
Value& operator= (float v);
|
Value& operator= (float v);
|
||||||
|
/** Assignment operator, assign from double to Value. */
|
||||||
Value& operator= (double v);
|
Value& operator= (double v);
|
||||||
|
/** Assignment operator, assign from bool to Value. */
|
||||||
Value& operator= (bool v);
|
Value& operator= (bool v);
|
||||||
|
/** Assignment operator, assign from char* to Value. */
|
||||||
Value& operator= (const char* v);
|
Value& operator= (const char* v);
|
||||||
|
/** Assignment operator, assign from string to Value. */
|
||||||
Value& operator= (const std::string& v);
|
Value& operator= (const std::string& v);
|
||||||
|
|
||||||
|
/** Assignment operator, assign from ValueVector to Value. */
|
||||||
Value& operator= (const ValueVector& v);
|
Value& operator= (const ValueVector& v);
|
||||||
|
/** Assignment operator, assign from ValueVector to Value. */
|
||||||
Value& operator= (ValueVector&& v);
|
Value& operator= (ValueVector&& v);
|
||||||
|
|
||||||
|
/** Assignment operator, assign from ValueMap to Value. */
|
||||||
Value& operator= (const ValueMap& v);
|
Value& operator= (const ValueMap& v);
|
||||||
Value& operator= (ValueMap&& v);
|
/** Assignment operator, assign from ValueMap to Value. It will use std::move internally. */
|
||||||
|
Value& operator= (ValueMap&& v);
|
||||||
|
|
||||||
|
/** Assignment operator, assign from ValueMapIntKey to Value. */
|
||||||
Value& operator= (const ValueMapIntKey& v);
|
Value& operator= (const ValueMapIntKey& v);
|
||||||
|
/** Assignment operator, assign from ValueMapIntKey to Value. It will use std::move internally. */
|
||||||
Value& operator= (ValueMapIntKey&& v);
|
Value& operator= (ValueMapIntKey&& v);
|
||||||
|
|
||||||
// equal operator
|
/** != operator overloading */
|
||||||
bool operator!= (const Value& v);
|
bool operator!= (const Value& v);
|
||||||
|
/** != operator overloading */
|
||||||
bool operator!= (const Value& v) const;
|
bool operator!= (const Value& v) const;
|
||||||
|
/** == operator overloading */
|
||||||
bool operator== (const Value& v);
|
bool operator== (const Value& v);
|
||||||
|
/** == operator overloading */
|
||||||
bool operator== (const Value& v) const;
|
bool operator== (const Value& v) const;
|
||||||
|
|
||||||
|
/** Gets as a byte value. Will convert to unsigned char if possible, or will trigger assert error. */
|
||||||
unsigned char asByte() const;
|
unsigned char asByte() const;
|
||||||
|
/** Gets as an integer value. Will convert to integer if possible, or will trigger assert error. */
|
||||||
int asInt() const;
|
int asInt() const;
|
||||||
|
/** Gets as a float value. Will convert to float if possible, or will trigger assert error. */
|
||||||
float asFloat() const;
|
float asFloat() const;
|
||||||
|
/** Gets as a double value. Will convert to double if possible, or will trigger assert error. */
|
||||||
double asDouble() const;
|
double asDouble() const;
|
||||||
|
/** Gets as a bool value. Will convert to bool if possible, or will trigger assert error. */
|
||||||
bool asBool() const;
|
bool asBool() const;
|
||||||
|
/** Gets as a string value. Will convert to string if possible, or will trigger assert error. */
|
||||||
std::string asString() const;
|
std::string asString() const;
|
||||||
|
|
||||||
|
/** Gets as a ValueVector reference. Will convert to ValueVector if possible, or will trigger assert error. */
|
||||||
ValueVector& asValueVector();
|
ValueVector& asValueVector();
|
||||||
|
/** Gets as a const ValueVector reference. Will convert to ValueVector if possible, or will trigger assert error. */
|
||||||
const ValueVector& asValueVector() const;
|
const ValueVector& asValueVector() const;
|
||||||
|
|
||||||
|
/** Gets as a ValueMap reference. Will convert to ValueMap if possible, or will trigger assert error. */
|
||||||
ValueMap& asValueMap();
|
ValueMap& asValueMap();
|
||||||
|
/** Gets as a const ValueMap reference. Will convert to ValueMap if possible, or will trigger assert error. */
|
||||||
const ValueMap& asValueMap() const;
|
const ValueMap& asValueMap() const;
|
||||||
|
|
||||||
|
/** Gets as a ValueMapIntKey reference. Will convert to ValueMapIntKey if possible, or will trigger assert error. */
|
||||||
ValueMapIntKey& asIntKeyMap();
|
ValueMapIntKey& asIntKeyMap();
|
||||||
|
/** Gets as a const ValueMapIntKey reference. Will convert to ValueMapIntKey if possible, or will trigger assert error. */
|
||||||
const ValueMapIntKey& asIntKeyMap() const;
|
const ValueMapIntKey& asIntKeyMap() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the Value is null.
|
||||||
|
* @return True if the Value is null, false if not.
|
||||||
|
*/
|
||||||
inline bool isNull() const { return _type == Type::NONE; }
|
inline bool isNull() const { return _type == Type::NONE; }
|
||||||
|
|
||||||
|
/** Value type wrapped by Value. */
|
||||||
enum class Type
|
enum class Type
|
||||||
{
|
{
|
||||||
|
/// no value is wrapped, an empty Value
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
|
/// wrap byte
|
||||||
BYTE,
|
BYTE,
|
||||||
|
/// wrap integer
|
||||||
INTEGER,
|
INTEGER,
|
||||||
|
/// wrap float
|
||||||
FLOAT,
|
FLOAT,
|
||||||
|
/// wrap double
|
||||||
DOUBLE,
|
DOUBLE,
|
||||||
|
/// wrap bool
|
||||||
BOOLEAN,
|
BOOLEAN,
|
||||||
|
/// wrap string
|
||||||
STRING,
|
STRING,
|
||||||
|
/// wrap vector
|
||||||
VECTOR,
|
VECTOR,
|
||||||
|
/// wrap ValueMap
|
||||||
MAP,
|
MAP,
|
||||||
|
/// wrap ValueMapIntKey
|
||||||
INT_KEY_MAP
|
INT_KEY_MAP
|
||||||
};
|
};
|
||||||
|
|
||||||
inline Type getType() const { return _type; };
|
/** Gets the value type. */
|
||||||
|
inline Type getType() const { return _type; }
|
||||||
|
|
||||||
|
/** Gets the description of the class. */
|
||||||
std::string getDescription() const;
|
std::string getDescription() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,9 +52,7 @@ const char* GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST_NO_MV = "ShaderPo
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_COLOR = "ShaderPositionColor";
|
const char* GLProgram::SHADER_NAME_POSITION_COLOR = "ShaderPositionColor";
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_COLOR_TEXASPOINTSIZE = "ShaderPositionColorTexAsPointsize";
|
const char* GLProgram::SHADER_NAME_POSITION_COLOR_TEXASPOINTSIZE = "ShaderPositionColorTexAsPointsize";
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_COLOR_NO_MVP = "ShaderPositionColor_noMVP";
|
const char* GLProgram::SHADER_NAME_POSITION_COLOR_NO_MVP = "ShaderPositionColor_noMVP";
|
||||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER)
|
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_COLOR_NO_MVP_GRAYSCALE = "ShaderPositionColor_noMVP_GrayScale";
|
|
||||||
#endif
|
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE = "ShaderPositionTexture";
|
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE = "ShaderPositionTexture";
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE_U_COLOR = "ShaderPositionTexture_uColor";
|
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE_U_COLOR = "ShaderPositionTexture_uColor";
|
||||||
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE_A8_COLOR = "ShaderPositionTextureA8Color";
|
const char* GLProgram::SHADER_NAME_POSITION_TEXTURE_A8_COLOR = "ShaderPositionTextureA8Color";
|
||||||
|
|
|
@ -245,13 +245,6 @@ void GLProgramCache::loadDefaultGLPrograms()
|
||||||
p = new GLProgram();
|
p = new GLProgram();
|
||||||
loadDefaultGLProgram(p, kShaderType_3DParticleTex);
|
loadDefaultGLProgram(p, kShaderType_3DParticleTex);
|
||||||
_programs.insert(std::make_pair(GLProgram::SHADER_3D_PARTICLE_TEXTURE, p));
|
_programs.insert(std::make_pair(GLProgram::SHADER_3D_PARTICLE_TEXTURE, p));
|
||||||
|
|
||||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER)
|
|
||||||
p = new GLProgram();
|
|
||||||
loadDefaultGLProgram(p, kShaderType_PositionColor_noMVP_GrayScale);
|
|
||||||
_programs.insert(std::make_pair(GLProgram::SHADER_NAME_POSITION_COLOR_NO_MVP_GRAYSCALE, p));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLProgramCache::reloadDefaultGLPrograms()
|
void GLProgramCache::reloadDefaultGLPrograms()
|
||||||
|
|
|
@ -70,7 +70,7 @@ public:
|
||||||
|
|
||||||
void execute();
|
void execute();
|
||||||
|
|
||||||
//used for bath
|
//used for batch
|
||||||
void preBatchDraw();
|
void preBatchDraw();
|
||||||
void batchDraw();
|
void batchDraw();
|
||||||
void postBatchDraw();
|
void postBatchDraw();
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the light type,light type MUST be one of LightType::DIRECTIONAL ,<br>
|
||||||
|
-- LightType::POINT, LightType::SPOT, LightType::AMBIENT.
|
||||||
-- @function [parent=#BaseLight] getLightType
|
-- @function [parent=#BaseLight] getLightType
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
|
@ -124,13 +124,13 @@
|
||||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the default camera of the current running scene.
|
||||||
-- @function [parent=#Camera] getDefaultCamera
|
-- @function [parent=#Camera] getDefaultCamera
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the visiting camera , the visiting camera shall be set on Scene::render
|
||||||
-- @function [parent=#Camera] getVisitingCamera
|
-- @function [parent=#Camera] getVisitingCamera
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||||
|
|
|
@ -8,20 +8,25 @@
|
||||||
-- If stencil has no childre it will not be drawn.<br>
|
-- If stencil has no childre it will not be drawn.<br>
|
||||||
-- If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
|
-- If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
|
||||||
-- then this method should return true every time you wish stencil to be visited.<br>
|
-- then this method should return true every time you wish stencil to be visited.<br>
|
||||||
|
-- By default returns true if has any children attached.<br>
|
||||||
|
-- return If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
|
||||||
|
-- then this method should return true every time you wish stencil to be visited.<br>
|
||||||
-- By default returns true if has any children attached.
|
-- By default returns true if has any children attached.
|
||||||
-- @function [parent=#ClippingNode] hasContent
|
-- @function [parent=#ClippingNode] hasContent
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the ClippingNode whether or not invert.<br>
|
||||||
|
-- param inverted A bool Type,to set the ClippingNode whether or not invert.
|
||||||
-- @function [parent=#ClippingNode] setInverted
|
-- @function [parent=#ClippingNode] setInverted
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool inverted
|
-- @param #bool inverted
|
||||||
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the Node to use as a stencil to do the clipping.<br>
|
||||||
|
-- param stencil The Node to use as a stencil to do the clipping.
|
||||||
-- @function [parent=#ClippingNode] setStencil
|
-- @function [parent=#ClippingNode] setStencil
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Node stencil
|
-- @param #cc.Node stencil
|
||||||
|
@ -31,7 +36,8 @@
|
||||||
-- The alpha threshold.<br>
|
-- The alpha threshold.<br>
|
||||||
-- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.<br>
|
-- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.<br>
|
||||||
-- Should be a float between 0 and 1.<br>
|
-- Should be a float between 0 and 1.<br>
|
||||||
-- This default to 1 (so alpha test is disabled).
|
-- This default to 1 (so alpha test is disabled).<br>
|
||||||
|
-- return The alpha threshold value,Should be a float between 0 and 1.
|
||||||
-- @function [parent=#ClippingNode] getAlphaThreshold
|
-- @function [parent=#ClippingNode] getAlphaThreshold
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
@ -39,13 +45,15 @@
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- The Node to use as a stencil to do the clipping.<br>
|
-- The Node to use as a stencil to do the clipping.<br>
|
||||||
-- The stencil node will be retained.<br>
|
-- The stencil node will be retained.<br>
|
||||||
-- This default to nil.
|
-- This default to nil.<br>
|
||||||
|
-- return The stencil node.
|
||||||
-- @function [parent=#ClippingNode] getStencil
|
-- @function [parent=#ClippingNode] getStencil
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Node#Node ret (return value: cc.Node)
|
-- @return Node#Node ret (return value: cc.Node)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the alpha threshold. <br>
|
||||||
|
-- param alphaThreshold The alpha threshold.
|
||||||
-- @function [parent=#ClippingNode] setAlphaThreshold
|
-- @function [parent=#ClippingNode] setAlphaThreshold
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float alphaThreshold
|
-- @param #float alphaThreshold
|
||||||
|
@ -54,7 +62,8 @@
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Inverted. If this is set to true,<br>
|
-- Inverted. If this is set to true,<br>
|
||||||
-- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.<br>
|
-- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.<br>
|
||||||
-- This default to false.
|
-- This default to false.<br>
|
||||||
|
-- return If the clippingNode is Inverted, it will be return true.
|
||||||
-- @function [parent=#ClippingNode] isInverted
|
-- @function [parent=#ClippingNode] isInverted
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Draw an line from origin to destination with color. <br>
|
||||||
|
-- param origin The line origin.<br>
|
||||||
|
-- param destination The line destination.<br>
|
||||||
|
-- param color The line color.
|
||||||
-- @function [parent=#DrawNode] drawLine
|
-- @function [parent=#DrawNode] drawLine
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table origin
|
-- @param #vec2_table origin
|
||||||
|
@ -48,7 +51,10 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- draw a dot at a position, with a given radius and color
|
-- draw a dot at a position, with a given radius and color. <br>
|
||||||
|
-- param pos The dot center.<br>
|
||||||
|
-- param radius The dot radius.<br>
|
||||||
|
-- param color The dot color.
|
||||||
-- @function [parent=#DrawNode] drawDot
|
-- @function [parent=#DrawNode] drawDot
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table pos
|
-- @param #vec2_table pos
|
||||||
|
@ -57,7 +63,11 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- draw a segment with a radius and color
|
-- draw a segment with a radius and color. <br>
|
||||||
|
-- param from The segment origin.<br>
|
||||||
|
-- param to The segment destination.<br>
|
||||||
|
-- param radius The segment radius.<br>
|
||||||
|
-- param color The segment color.
|
||||||
-- @function [parent=#DrawNode] drawSegment
|
-- @function [parent=#DrawNode] drawSegment
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table from
|
-- @param #vec2_table from
|
||||||
|
@ -67,6 +77,7 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
-- Get the color mixed mode.<br>
|
||||||
-- js NA<br>
|
-- js NA<br>
|
||||||
-- lua NA
|
-- lua NA
|
||||||
-- @function [parent=#DrawNode] getBlendFunc
|
-- @function [parent=#DrawNode] getBlendFunc
|
||||||
|
@ -97,7 +108,12 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Draws a quad bezier path.<br>
|
||||||
|
-- param origin The origin of the bezier path.<br>
|
||||||
|
-- param control The control of the bezier path.<br>
|
||||||
|
-- param destination The destination of the bezier path.<br>
|
||||||
|
-- param segments The The number of segments.<br>
|
||||||
|
-- param color Set the quad bezier color.
|
||||||
-- @function [parent=#DrawNode] drawQuadBezier
|
-- @function [parent=#DrawNode] drawQuadBezier
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table origin
|
-- @param #vec2_table origin
|
||||||
|
@ -116,7 +132,11 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- draw a triangle with color
|
-- draw a triangle with color. <br>
|
||||||
|
-- param p1 The triangle vertex point.<br>
|
||||||
|
-- param p2 The triangle vertex point.<br>
|
||||||
|
-- param p3 The triangle vertex point.<br>
|
||||||
|
-- param color The triangle color.
|
||||||
-- @function [parent=#DrawNode] drawTriangle
|
-- @function [parent=#DrawNode] drawTriangle
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table p1
|
-- @param #vec2_table p1
|
||||||
|
@ -126,6 +146,7 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
-- Set the color mixed mode.<br>
|
||||||
-- code<br>
|
-- code<br>
|
||||||
-- When this function bound into js or lua,the parameter will be changed<br>
|
-- When this function bound into js or lua,the parameter will be changed<br>
|
||||||
-- In js: var setBlendFunc(var src, var dst)<br>
|
-- In js: var setBlendFunc(var src, var dst)<br>
|
||||||
|
@ -143,7 +164,11 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Draws a solid rectangle given the origin and destination point measured in points.<br>
|
||||||
|
-- The origin and the destination can not have the same x and y coordinate.<br>
|
||||||
|
-- param origin The rectangle origin.<br>
|
||||||
|
-- param destination The rectangle destination.<br>
|
||||||
|
-- param color The rectangle color.
|
||||||
-- @function [parent=#DrawNode] drawSolidRect
|
-- @function [parent=#DrawNode] drawSolidRect
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table origin
|
-- @param #vec2_table origin
|
||||||
|
@ -152,7 +177,10 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Draw a point.<br>
|
||||||
|
-- param point A Vec2 used to point.<br>
|
||||||
|
-- param pointSize The point size.<br>
|
||||||
|
-- param color The point color.
|
||||||
-- @function [parent=#DrawNode] drawPoint
|
-- @function [parent=#DrawNode] drawPoint
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table point
|
-- @param #vec2_table point
|
||||||
|
@ -161,7 +189,13 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- draw a cubic bezier curve with color and number of segments
|
-- Draw a cubic bezier curve with color and number of segments<br>
|
||||||
|
-- param origin The origin of the bezier path.<br>
|
||||||
|
-- param control1 The first control of the bezier path.<br>
|
||||||
|
-- param control2 The second control of the bezier path.<br>
|
||||||
|
-- param destination The destination of the bezier path.<br>
|
||||||
|
-- param segments The The number of segments.<br>
|
||||||
|
-- param color Set the cubic bezier color.
|
||||||
-- @function [parent=#DrawNode] drawCubicBezier
|
-- @function [parent=#DrawNode] drawCubicBezier
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table origin
|
-- @param #vec2_table origin
|
||||||
|
@ -173,7 +207,8 @@
|
||||||
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates and initialize a DrawNode node
|
-- creates and initialize a DrawNode node.<br>
|
||||||
|
-- return Return an autorelease object.
|
||||||
-- @function [parent=#DrawNode] create
|
-- @function [parent=#DrawNode] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return DrawNode#DrawNode ret (return value: cc.DrawNode)
|
-- @return DrawNode#DrawNode ret (return value: cc.DrawNode)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Remove all living segments of the ribbon
|
-- Remove all living segments of the ribbon.
|
||||||
-- @function [parent=#MotionStreak] reset
|
-- @function [parent=#MotionStreak] reset
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
|
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
|
||||||
|
@ -24,7 +24,8 @@
|
||||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- color used for the tint
|
-- Color used for the tint.<br>
|
||||||
|
-- param colors The color used for the tint.
|
||||||
-- @function [parent=#MotionStreak] tintWithColor
|
-- @function [parent=#MotionStreak] tintWithColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color3b_table colors
|
-- @param #color3b_table colors
|
||||||
|
@ -39,7 +40,8 @@
|
||||||
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
|
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the starting position initialized or not.<br>
|
||||||
|
-- param bStartingPositionInitialized True if initialized the starting position.
|
||||||
-- @function [parent=#MotionStreak] setStartingPositionInitialized
|
-- @function [parent=#MotionStreak] setStartingPositionInitialized
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool bStartingPositionInitialized
|
-- @param #bool bStartingPositionInitialized
|
||||||
|
@ -53,19 +55,22 @@
|
||||||
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Is the starting position initialized or not.<br>
|
||||||
|
-- return True if the starting position is initialized.
|
||||||
-- @function [parent=#MotionStreak] isStartingPositionInitialized
|
-- @function [parent=#MotionStreak] isStartingPositionInitialized
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- When fast mode is enabled, new points are added faster but with lower precision
|
-- When fast mode is enabled, new points are added faster but with lower precision. <br>
|
||||||
|
-- return True if fast mode is enabled.
|
||||||
-- @function [parent=#MotionStreak] isFastMode
|
-- @function [parent=#MotionStreak] isFastMode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets fast mode or not.<br>
|
||||||
|
-- param bFastMode True if enabled fast mode.
|
||||||
-- @function [parent=#MotionStreak] setFastMode
|
-- @function [parent=#MotionStreak] setFastMode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool bFastMode
|
-- @param #bool bFastMode
|
||||||
|
|
|
@ -5,7 +5,11 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Adds a child to the container with a local z-order, parallax ratio and position offset.<br>
|
||||||
|
-- param child A child node.<br>
|
||||||
|
-- param z Z order for drawing priority.<br>
|
||||||
|
-- param parallaxRatio A given parallax ratio.<br>
|
||||||
|
-- param positionOffset A given position offset.
|
||||||
-- @function [parent=#ParallaxNode] addChild
|
-- @function [parent=#ParallaxNode] addChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Node child
|
-- @param #cc.Node child
|
||||||
|
@ -22,7 +26,8 @@
|
||||||
-- @return ParallaxNode#ParallaxNode self (return value: cc.ParallaxNode)
|
-- @return ParallaxNode#ParallaxNode self (return value: cc.ParallaxNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a Parallax node. <br>
|
||||||
|
-- return An autoreleased ParallaxNode object.
|
||||||
-- @function [parent=#ParallaxNode] create
|
-- @function [parent=#ParallaxNode] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode)
|
-- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode)
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- disables a particle by inserting a 0'd quad into the texture atlas
|
-- Disables a particle by inserting a 0'd quad into the texture atlas.<br>
|
||||||
|
-- param particleIndex The index of the particle.
|
||||||
-- @function [parent=#ParticleBatchNode] disableParticle
|
-- @function [parent=#ParticleBatchNode] disableParticle
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int particleIndex
|
-- @param #int particleIndex
|
||||||
|
@ -25,7 +26,8 @@
|
||||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets the texture atlas used for drawing the quads
|
-- Sets the texture atlas used for drawing the quads.<br>
|
||||||
|
-- param atlas The texture atlas used for drawing the quads.
|
||||||
-- @function [parent=#ParticleBatchNode] setTextureAtlas
|
-- @function [parent=#ParticleBatchNode] setTextureAtlas
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.TextureAtlas atlas
|
-- @param #cc.TextureAtlas atlas
|
||||||
|
@ -50,7 +52,8 @@
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Gets the texture atlas used for drawing the quads
|
-- Gets the texture atlas used for drawing the quads.<br>
|
||||||
|
-- return The texture atlas used for drawing the quads.
|
||||||
-- @function [parent=#ParticleBatchNode] getTextureAtlas
|
-- @function [parent=#ParticleBatchNode] getTextureAtlas
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
||||||
|
@ -63,7 +66,9 @@
|
||||||
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Inserts a child into the ParticleBatchNode
|
-- Inserts a child into the ParticleBatchNode.<br>
|
||||||
|
-- param system A given particle system.<br>
|
||||||
|
-- param index The insert index.
|
||||||
-- @function [parent=#ParticleBatchNode] insertChild
|
-- @function [parent=#ParticleBatchNode] insertChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.ParticleSystem system
|
-- @param #cc.ParticleSystem system
|
||||||
|
@ -71,7 +76,9 @@
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Remove a child of the ParticleBatchNode.<br>
|
||||||
|
-- param index The index of the child.<br>
|
||||||
|
-- param doCleanup True if all actions and callbacks on this node should be removed, false otherwise.
|
||||||
-- @function [parent=#ParticleBatchNode] removeChildAtIndex
|
-- @function [parent=#ParticleBatchNode] removeChildAtIndex
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int index
|
-- @param #int index
|
||||||
|
@ -79,7 +86,10 @@
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode self (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles
|
-- Create the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles.<br>
|
||||||
|
-- param fileImage A given file name.<br>
|
||||||
|
-- param capacity A capacity of particles.<br>
|
||||||
|
-- return An autoreleased ParticleBatchNode object.
|
||||||
-- @function [parent=#ParticleBatchNode] create
|
-- @function [parent=#ParticleBatchNode] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string fileImage
|
-- @param #string fileImage
|
||||||
|
@ -87,7 +97,10 @@
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- initializes the particle system with Texture2D, a capacity of particles, which particle system to use
|
-- Create the particle system with Texture2D, a capacity of particles, which particle system to use.<br>
|
||||||
|
-- param tex A given texture.<br>
|
||||||
|
-- param capacity A capacity of particles.<br>
|
||||||
|
-- return An autoreleased ParticleBatchNode object.
|
||||||
-- @function [parent=#ParticleBatchNode] createWithTexture
|
-- @function [parent=#ParticleBatchNode] createWithTexture
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Texture2D tex
|
-- @param #cc.Texture2D tex
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a explosion particle system.<br>
|
||||||
|
-- return An autoreleased ParticleExplosion object.
|
||||||
-- @function [parent=#ParticleExplosion] create
|
-- @function [parent=#ParticleExplosion] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion)
|
-- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a explosion particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleExplosion object.
|
||||||
-- @function [parent=#ParticleExplosion] createWithTotalParticles
|
-- @function [parent=#ParticleExplosion] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a fire particle system.<br>
|
||||||
|
-- return An autoreleased ParticleFire object.
|
||||||
-- @function [parent=#ParticleFire] create
|
-- @function [parent=#ParticleFire] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire)
|
-- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a fire particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleFire object.
|
||||||
-- @function [parent=#ParticleFire] createWithTotalParticles
|
-- @function [parent=#ParticleFire] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a fireworks particle system.<br>
|
||||||
|
-- return An autoreleased ParticleFireworks object.
|
||||||
-- @function [parent=#ParticleFireworks] create
|
-- @function [parent=#ParticleFireworks] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks)
|
-- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a fireworks particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleFireworks object.
|
||||||
-- @function [parent=#ParticleFireworks] createWithTotalParticles
|
-- @function [parent=#ParticleFireworks] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a flower particle system.<br>
|
||||||
|
-- return An autoreleased ParticleFlower object.
|
||||||
-- @function [parent=#ParticleFlower] create
|
-- @function [parent=#ParticleFlower] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower)
|
-- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a flower particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleFlower object.
|
||||||
-- @function [parent=#ParticleFlower] createWithTotalParticles
|
-- @function [parent=#ParticleFlower] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a galaxy particle system.<br>
|
||||||
|
-- return An autoreleased ParticleGalaxy object.
|
||||||
-- @function [parent=#ParticleGalaxy] create
|
-- @function [parent=#ParticleGalaxy] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy)
|
-- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a galaxy particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleGalaxy object.
|
||||||
-- @function [parent=#ParticleGalaxy] createWithTotalParticles
|
-- @function [parent=#ParticleGalaxy] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a meteor particle system.<br>
|
||||||
|
-- return An autoreleased ParticleMeteor object.
|
||||||
-- @function [parent=#ParticleMeteor] create
|
-- @function [parent=#ParticleMeteor] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor)
|
-- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a meteor particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleMeteor object.
|
||||||
-- @function [parent=#ParticleMeteor] createWithTotalParticles
|
-- @function [parent=#ParticleMeteor] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a rain particle system.<br>
|
||||||
|
-- return An autoreleased ParticleRain object.
|
||||||
-- @function [parent=#ParticleRain] create
|
-- @function [parent=#ParticleRain] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain)
|
-- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a rain particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleRain object.
|
||||||
-- @function [parent=#ParticleRain] createWithTotalParticles
|
-- @function [parent=#ParticleRain] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a smoke particle system.<br>
|
||||||
|
-- return An autoreleased ParticleSmoke object.
|
||||||
-- @function [parent=#ParticleSmoke] create
|
-- @function [parent=#ParticleSmoke] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke)
|
-- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a smoke particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSmoke object.
|
||||||
-- @function [parent=#ParticleSmoke] createWithTotalParticles
|
-- @function [parent=#ParticleSmoke] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a snow particle system.<br>
|
||||||
|
-- return An autoreleased ParticleSnow object.
|
||||||
-- @function [parent=#ParticleSnow] create
|
-- @function [parent=#ParticleSnow] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow)
|
-- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a snow particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSnow object.
|
||||||
-- @function [parent=#ParticleSnow] createWithTotalParticles
|
-- @function [parent=#ParticleSnow] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a spiral particle system.<br>
|
||||||
|
-- return An autoreleased ParticleSpiral object.
|
||||||
-- @function [parent=#ParticleSpiral] create
|
-- @function [parent=#ParticleSpiral] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral)
|
-- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a spiral particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSpiral object.
|
||||||
-- @function [parent=#ParticleSpiral] createWithTotalParticles
|
-- @function [parent=#ParticleSpiral] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a sun particle system.<br>
|
||||||
|
-- return An autoreleased ParticleSun object.
|
||||||
-- @function [parent=#ParticleSun] create
|
-- @function [parent=#ParticleSun] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun)
|
-- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Create a sun particle system withe a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSun object.
|
||||||
-- @function [parent=#ParticleSun] createWithTotalParticles
|
-- @function [parent=#ParticleSun] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- size variance in pixels of each particle
|
-- Gets the start size variance in pixels of each particle.<br>
|
||||||
|
-- return The start size variance in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartSizeVar
|
-- @function [parent=#ParticleSystem] getStartSizeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
@ -17,149 +18,172 @@
|
||||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- whether or not the system is full
|
-- Whether or not the system is full.<br>
|
||||||
|
-- return True if the system is full.
|
||||||
-- @function [parent=#ParticleSystem] isFull
|
-- @function [parent=#ParticleSystem] isFull
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the batch node.<br>
|
||||||
|
-- return The batch node.
|
||||||
-- @function [parent=#ParticleSystem] getBatchNode
|
-- @function [parent=#ParticleSystem] getBatchNode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode)
|
-- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- start color of each particle
|
-- Gets the start color of each particle.<br>
|
||||||
|
-- return The start color of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartColor
|
-- @function [parent=#ParticleSystem] getStartColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- particles movement type: Free or Grouped<br>
|
-- Gets the particles movement type: Free or Grouped.<br>
|
||||||
-- since v0.8
|
-- since v0.8<br>
|
||||||
|
-- return The particles movement type.
|
||||||
-- @function [parent=#ParticleSystem] getPositionType
|
-- @function [parent=#ParticleSystem] getPositionType
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the position variance of the emitter.<br>
|
||||||
|
-- param pos The position variance of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] setPosVar
|
-- @function [parent=#ParticleSystem] setPosVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table pos
|
-- @param #vec2_table pos
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the end spin of each particle.<br>
|
||||||
|
-- return The end spin of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndSpin
|
-- @function [parent=#ParticleSystem] getEndSpin
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the rotate per second variance.<br>
|
||||||
|
-- param degrees The rotate per second variance.
|
||||||
-- @function [parent=#ParticleSystem] setRotatePerSecondVar
|
-- @function [parent=#ParticleSystem] setRotatePerSecondVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float degrees
|
-- @param #float degrees
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the start spin variance of each particle.<br>
|
||||||
|
-- return The start spin variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartSpinVar
|
-- @function [parent=#ParticleSystem] getStartSpinVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the radial acceleration variance.<br>
|
||||||
|
-- return The radial acceleration variance.
|
||||||
-- @function [parent=#ParticleSystem] getRadialAccelVar
|
-- @function [parent=#ParticleSystem] getRadialAccelVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- end size variance in pixels of each particle
|
-- Gets the end size variance in pixels of each particle.<br>
|
||||||
|
-- return The end size variance in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndSizeVar
|
-- @function [parent=#ParticleSystem] getEndSizeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the tangential acceleration.<br>
|
||||||
|
-- param t The tangential acceleration.
|
||||||
-- @function [parent=#ParticleSystem] setTangentialAccel
|
-- @function [parent=#ParticleSystem] setTangentialAccel
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the radial acceleration.<br>
|
||||||
|
-- return The radial acceleration.
|
||||||
-- @function [parent=#ParticleSystem] getRadialAccel
|
-- @function [parent=#ParticleSystem] getRadialAccel
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start radius.<br>
|
||||||
|
-- param startRadius The start radius.
|
||||||
-- @function [parent=#ParticleSystem] setStartRadius
|
-- @function [parent=#ParticleSystem] setStartRadius
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float startRadius
|
-- @param #float startRadius
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the number of degrees to rotate a particle around the source pos per second.<br>
|
||||||
|
-- param degrees The number of degrees to rotate a particle around the source pos per second.
|
||||||
-- @function [parent=#ParticleSystem] setRotatePerSecond
|
-- @function [parent=#ParticleSystem] setRotatePerSecond
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float degrees
|
-- @param #float degrees
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end size in pixels of each particle.<br>
|
||||||
|
-- param endSize The end size in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndSize
|
-- @function [parent=#ParticleSystem] setEndSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float endSize
|
-- @param #float endSize
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the garvity.<br>
|
||||||
|
-- return The gravity.
|
||||||
-- @function [parent=#ParticleSystem] getGravity
|
-- @function [parent=#ParticleSystem] getGravity
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the tangential acceleration.<br>
|
||||||
|
-- return The tangential acceleration.
|
||||||
-- @function [parent=#ParticleSystem] getTangentialAccel
|
-- @function [parent=#ParticleSystem] getTangentialAccel
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end radius.<br>
|
||||||
|
-- param endRadius The end radius.
|
||||||
-- @function [parent=#ParticleSystem] setEndRadius
|
-- @function [parent=#ParticleSystem] setEndRadius
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float endRadius
|
-- @param #float endRadius
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the speed.<br>
|
||||||
|
-- return The speed.
|
||||||
-- @function [parent=#ParticleSystem] getSpeed
|
-- @function [parent=#ParticleSystem] getSpeed
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- angle and angle variation of each particle
|
-- Gets the angle of each particle. <br>
|
||||||
|
-- return The angle of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getAngle
|
-- @function [parent=#ParticleSystem] getAngle
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end color and end color variation of each particle.<br>
|
||||||
|
-- param color The end color and end color variation of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndColor
|
-- @function [parent=#ParticleSystem] setEndColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color4f_table color
|
-- @param #color4f_table color
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start spin of each particle.<br>
|
||||||
|
-- param spin The start spin of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartSpin
|
-- @function [parent=#ParticleSystem] setStartSpin
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float spin
|
-- @param #float spin
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets how many seconds the emitter will run. -1 means 'forever'.<br>
|
||||||
|
-- param duration The seconds that the emitter will run. -1 means 'forever'.
|
||||||
-- @function [parent=#ParticleSystem] setDuration
|
-- @function [parent=#ParticleSystem] setDuration
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float duration
|
-- @param #float duration
|
||||||
|
@ -173,83 +197,95 @@
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Position variance of the emitter
|
-- Gets the position variance of the emitter.<br>
|
||||||
|
-- return The position variance of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] getPosVar
|
-- @function [parent=#ParticleSystem] getPosVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Call the update mathod with no time..
|
||||||
-- @function [parent=#ParticleSystem] updateWithNoTime
|
-- @function [parent=#ParticleSystem] updateWithNoTime
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Whether or not the particle system is blend additive.<br>
|
||||||
|
-- return True if the particle system is blend additive.
|
||||||
-- @function [parent=#ParticleSystem] isBlendAdditive
|
-- @function [parent=#ParticleSystem] isBlendAdditive
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the speed variance.<br>
|
||||||
|
-- return The speed variance.
|
||||||
-- @function [parent=#ParticleSystem] getSpeedVar
|
-- @function [parent=#ParticleSystem] getSpeedVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the particles movement type: Free or Grouped.<br>
|
||||||
|
-- since v0.8<br>
|
||||||
|
-- param type The particles movement type.
|
||||||
-- @function [parent=#ParticleSystem] setPositionType
|
-- @function [parent=#ParticleSystem] setPositionType
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int type
|
-- @param #int type
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- stop emitting particles. Running particles will continue to run until they die
|
-- Stop emitting particles. Running particles will continue to run until they die.
|
||||||
-- @function [parent=#ParticleSystem] stopSystem
|
-- @function [parent=#ParticleSystem] stopSystem
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- sourcePosition of the emitter
|
-- Gets the source position of the emitter.<br>
|
||||||
|
-- return The source position of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] getSourcePosition
|
-- @function [parent=#ParticleSystem] getSourcePosition
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the life variance of each particle.<br>
|
||||||
|
-- param lifeVar The life variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setLifeVar
|
-- @function [parent=#ParticleSystem] setLifeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float lifeVar
|
-- @param #float lifeVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the maximum particles of the system.<br>
|
||||||
|
-- param totalParticles The maximum particles of the system.
|
||||||
-- @function [parent=#ParticleSystem] setTotalParticles
|
-- @function [parent=#ParticleSystem] setTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int totalParticles
|
-- @param #int totalParticles
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end color variance of each particle.<br>
|
||||||
|
-- param color The end color variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndColorVar
|
-- @function [parent=#ParticleSystem] setEndColorVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color4f_table color
|
-- @param #color4f_table color
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the index of system in batch node array.<br>
|
||||||
|
-- return The index of system in batch node array.
|
||||||
-- @function [parent=#ParticleSystem] getAtlasIndex
|
-- @function [parent=#ParticleSystem] getAtlasIndex
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- start size in pixels of each particle
|
-- Gets the start size in pixels of each particle.<br>
|
||||||
|
-- return The start size in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartSize
|
-- @function [parent=#ParticleSystem] getStartSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start spin variance of each particle.<br>
|
||||||
|
-- param pinVar The start spin variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartSpinVar
|
-- @function [parent=#ParticleSystem] setStartSpinVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float pinVar
|
-- @param #float pinVar
|
||||||
|
@ -262,289 +298,333 @@
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the index of system in batch node array.<br>
|
||||||
|
-- param index The index of system in batch node array.
|
||||||
-- @function [parent=#ParticleSystem] setAtlasIndex
|
-- @function [parent=#ParticleSystem] setAtlasIndex
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int index
|
-- @param #int index
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the tangential acceleration variance.<br>
|
||||||
|
-- param t The tangential acceleration variance.
|
||||||
-- @function [parent=#ParticleSystem] setTangentialAccelVar
|
-- @function [parent=#ParticleSystem] setTangentialAccelVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end radius variance.<br>
|
||||||
|
-- param endRadiusVar The end radius variance.
|
||||||
-- @function [parent=#ParticleSystem] setEndRadiusVar
|
-- @function [parent=#ParticleSystem] setEndRadiusVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float endRadiusVar
|
-- @param #float endRadiusVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the end radius.<br>
|
||||||
|
-- return The end radius.
|
||||||
-- @function [parent=#ParticleSystem] getEndRadius
|
-- @function [parent=#ParticleSystem] getEndRadius
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Whether or not the particle system is active.<br>
|
||||||
|
-- return True if the particle system is active.
|
||||||
-- @function [parent=#ParticleSystem] isActive
|
-- @function [parent=#ParticleSystem] isActive
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the radial acceleration variance.<br>
|
||||||
|
-- param t The radial acceleration variance.
|
||||||
-- @function [parent=#ParticleSystem] setRadialAccelVar
|
-- @function [parent=#ParticleSystem] setRadialAccelVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start size in pixels of each particle.<br>
|
||||||
|
-- param startSize The start size in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartSize
|
-- @function [parent=#ParticleSystem] setStartSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float startSize
|
-- @param #float startSize
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the speed.<br>
|
||||||
|
-- param speed The speed.
|
||||||
-- @function [parent=#ParticleSystem] setSpeed
|
-- @function [parent=#ParticleSystem] setSpeed
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float speed
|
-- @param #float speed
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the start spin of each particle.<br>
|
||||||
|
-- return The start spin of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartSpin
|
-- @function [parent=#ParticleSystem] getStartSpin
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the number of degrees to rotate a particle around the source pos per second.<br>
|
||||||
|
-- return The number of degrees to rotate a particle around the source pos per second.
|
||||||
-- @function [parent=#ParticleSystem] getRotatePerSecond
|
-- @function [parent=#ParticleSystem] getRotatePerSecond
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the mode of the emitter.<br>
|
||||||
|
-- param mode The mode of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] setEmitterMode
|
-- @function [parent=#ParticleSystem] setEmitterMode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int mode
|
-- @param #int mode
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- How many seconds the emitter will run. -1 means 'forever'
|
-- Gets how many seconds the emitter will run. -1 means 'forever'.<br>
|
||||||
|
-- return The seconds that the emitter will run. -1 means 'forever'.
|
||||||
-- @function [parent=#ParticleSystem] getDuration
|
-- @function [parent=#ParticleSystem] getDuration
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the source position of the emitter.<br>
|
||||||
|
-- param The source position of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] setSourcePosition
|
-- @function [parent=#ParticleSystem] setSourcePosition
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table pos
|
-- @param #vec2_table pos
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the end spin variance of each particle.<br>
|
||||||
|
-- return The end spin variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndSpinVar
|
-- @function [parent=#ParticleSystem] getEndSpinVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the particle system blend additive.<br>
|
||||||
|
-- param value True if the particle system is blend additive.
|
||||||
-- @function [parent=#ParticleSystem] setBlendAdditive
|
-- @function [parent=#ParticleSystem] setBlendAdditive
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool value
|
-- @param #bool value
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the life of each particle.<br>
|
||||||
|
-- param life The life of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setLife
|
-- @function [parent=#ParticleSystem] setLife
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float life
|
-- @param #float life
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the angle variance of each particle.<br>
|
||||||
|
-- param angleVar The angle variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setAngleVar
|
-- @function [parent=#ParticleSystem] setAngleVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float angleVar
|
-- @param #float angleVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the rotation of each particle to its direction.<br>
|
||||||
|
-- param t True if the rotation is the direction.
|
||||||
-- @function [parent=#ParticleSystem] setRotationIsDir
|
-- @function [parent=#ParticleSystem] setRotationIsDir
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool t
|
-- @param #bool t
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end size variance in pixels of each particle.<br>
|
||||||
|
-- param sizeVar The end size variance in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndSizeVar
|
-- @function [parent=#ParticleSystem] setEndSizeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float sizeVar
|
-- @param #float sizeVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the angle of each particle.<br>
|
||||||
|
-- param angle The angle of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setAngle
|
-- @function [parent=#ParticleSystem] setAngle
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float angle
|
-- @param #float angle
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the batch node.<br>
|
||||||
|
-- param batchNode The batch node.
|
||||||
-- @function [parent=#ParticleSystem] setBatchNode
|
-- @function [parent=#ParticleSystem] setBatchNode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.ParticleBatchNode batchNode
|
-- @param #cc.ParticleBatchNode batchNode
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the tangential acceleration variance.<br>
|
||||||
|
-- return The tangential acceleration variance.
|
||||||
-- @function [parent=#ParticleSystem] getTangentialAccelVar
|
-- @function [parent=#ParticleSystem] getTangentialAccelVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Switch between different kind of emitter modes:<br>
|
-- Switch between different kind of emitter modes:<br>
|
||||||
-- - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration<br>
|
-- - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration.<br>
|
||||||
-- - kParticleModeRadius: uses radius movement + rotation
|
-- - kParticleModeRadius: uses radius movement + rotation.<br>
|
||||||
|
-- return The mode of the emitter.
|
||||||
-- @function [parent=#ParticleSystem] getEmitterMode
|
-- @function [parent=#ParticleSystem] getEmitterMode
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end spin variance of each particle.<br>
|
||||||
|
-- param endSpinVar The end spin variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndSpinVar
|
-- @function [parent=#ParticleSystem] setEndSpinVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float endSpinVar
|
-- @param #float endSpinVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- angle variance of each particle
|
-- Gets the angle variance of each particle.<br>
|
||||||
|
-- return The angle variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getAngleVar
|
-- @function [parent=#ParticleSystem] getAngleVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start color of each particle.<br>
|
||||||
|
-- param color The start color of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartColor
|
-- @function [parent=#ParticleSystem] setStartColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color4f_table color
|
-- @param #color4f_table color
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the rotate per second variance.<br>
|
||||||
|
-- return The rotate per second variance.
|
||||||
-- @function [parent=#ParticleSystem] getRotatePerSecondVar
|
-- @function [parent=#ParticleSystem] getRotatePerSecondVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- end size in pixels of each particle
|
-- Gets the end size in pixels of each particle.<br>
|
||||||
|
-- return The end size in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndSize
|
-- @function [parent=#ParticleSystem] getEndSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- life, and life variation of each particle
|
-- Gets the life of each particle.<br>
|
||||||
|
-- return The life of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getLife
|
-- @function [parent=#ParticleSystem] getLife
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the speed variance.<br>
|
||||||
|
-- param speed The speed variance.
|
||||||
-- @function [parent=#ParticleSystem] setSpeedVar
|
-- @function [parent=#ParticleSystem] setSpeedVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float speed
|
-- @param #float speed
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the particle system auto removed it self on finish.<br>
|
||||||
|
-- param var True if the particle system removed self on finish.
|
||||||
-- @function [parent=#ParticleSystem] setAutoRemoveOnFinish
|
-- @function [parent=#ParticleSystem] setAutoRemoveOnFinish
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool var
|
-- @param #bool var
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the gravity.<br>
|
||||||
|
-- param g The gravity.
|
||||||
-- @function [parent=#ParticleSystem] setGravity
|
-- @function [parent=#ParticleSystem] setGravity
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table g
|
-- @param #vec2_table g
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- should be overridden by subclasses
|
-- Update the VBO verts buffer which does not use batch node,<br>
|
||||||
|
-- should be overridden by subclasses.
|
||||||
-- @function [parent=#ParticleSystem] postStep
|
-- @function [parent=#ParticleSystem] postStep
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the emission rate of the particles.<br>
|
||||||
|
-- param rate The emission rate of the particles.
|
||||||
-- @function [parent=#ParticleSystem] setEmissionRate
|
-- @function [parent=#ParticleSystem] setEmissionRate
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float rate
|
-- @param #float rate
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- end color variance of each particle
|
-- Gets the end color variance of each particle.<br>
|
||||||
|
-- return The end color variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndColorVar
|
-- @function [parent=#ParticleSystem] getEndColorVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Whether or not the rotation of each particle to its direction.<br>
|
||||||
|
-- return True if the rotation is the direction.
|
||||||
-- @function [parent=#ParticleSystem] getRotationIsDir
|
-- @function [parent=#ParticleSystem] getRotationIsDir
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- emission rate of the particles
|
-- Gets the emission rate of the particles.<br>
|
||||||
|
-- return The emission rate of the particles.
|
||||||
-- @function [parent=#ParticleSystem] getEmissionRate
|
-- @function [parent=#ParticleSystem] getEmissionRate
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- end color and end color variation of each particle
|
-- Gets the end color and end color variation of each particle.<br>
|
||||||
|
-- return The end color and end color variation of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getEndColor
|
-- @function [parent=#ParticleSystem] getEndColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- life variance of each particle
|
-- Gets the life variance of each particle.<br>
|
||||||
|
-- return The life variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getLifeVar
|
-- @function [parent=#ParticleSystem] getLifeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start size variance in pixels of each particle.<br>
|
||||||
|
-- param sizeVar The start size variance in pixels of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartSizeVar
|
-- @function [parent=#ParticleSystem] setStartSizeVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float sizeVar
|
-- @param #float sizeVar
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Add a particle to the emitter
|
-- Add a particle to the emitter.<br>
|
||||||
|
-- return True if add success.
|
||||||
-- @function [parent=#ParticleSystem] addParticle
|
-- @function [parent=#ParticleSystem] addParticle
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the start radius.<br>
|
||||||
|
-- return The start radius.
|
||||||
-- @function [parent=#ParticleSystem] getStartRadius
|
-- @function [parent=#ParticleSystem] getStartRadius
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Quantity of particles that are being simulated at the moment
|
-- Gets the Quantity of particles that are being simulated at the moment.<br>
|
||||||
|
-- return The Quantity of particles that are being simulated at the moment.
|
||||||
-- @function [parent=#ParticleSystem] getParticleCount
|
-- @function [parent=#ParticleSystem] getParticleCount
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the start radius variance.<br>
|
||||||
|
-- return The start radius variance.
|
||||||
-- @function [parent=#ParticleSystem] getStartRadiusVar
|
-- @function [parent=#ParticleSystem] getStartRadiusVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
@ -557,40 +637,46 @@
|
||||||
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start color variance of each particle.<br>
|
||||||
|
-- param color The start color variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setStartColorVar
|
-- @function [parent=#ParticleSystem] setStartColorVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color4f_table color
|
-- @param #color4f_table color
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the end spin of each particle.<br>
|
||||||
|
-- param endSpin The end spin of each particle.
|
||||||
-- @function [parent=#ParticleSystem] setEndSpin
|
-- @function [parent=#ParticleSystem] setEndSpin
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float endSpin
|
-- @param #float endSpin
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the radial acceleration.<br>
|
||||||
|
-- param t The radial acceleration.
|
||||||
-- @function [parent=#ParticleSystem] setRadialAccel
|
-- @function [parent=#ParticleSystem] setRadialAccel
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Whether or not the particle system removed self on finish.<br>
|
||||||
|
-- return True if the particle system removed self on finish.
|
||||||
-- @function [parent=#ParticleSystem] isAutoRemoveOnFinish
|
-- @function [parent=#ParticleSystem] isAutoRemoveOnFinish
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- maximum particles of the system
|
-- Gets the maximum particles of the system.<br>
|
||||||
|
-- return The maximum particles of the system.
|
||||||
-- @function [parent=#ParticleSystem] getTotalParticles
|
-- @function [parent=#ParticleSystem] getTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Sets the start radius variance.<br>
|
||||||
|
-- param startRadiusVar The start radius variance.
|
||||||
-- @function [parent=#ParticleSystem] setStartRadiusVar
|
-- @function [parent=#ParticleSystem] setStartRadiusVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float startRadiusVar
|
-- @param #float startRadiusVar
|
||||||
|
@ -608,29 +694,35 @@
|
||||||
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem self (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Gets the end radius variance.<br>
|
||||||
|
-- return The end radius variance.
|
||||||
-- @function [parent=#ParticleSystem] getEndRadiusVar
|
-- @function [parent=#ParticleSystem] getEndRadiusVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- start color variance of each particle
|
-- Gets the start color variance of each particle.<br>
|
||||||
|
-- return The start color variance of each particle.
|
||||||
-- @function [parent=#ParticleSystem] getStartColorVar
|
-- @function [parent=#ParticleSystem] getStartColorVar
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates an initializes a ParticleSystem from a plist file.<br>
|
-- Creates an initializes a ParticleSystem from a plist file.<br>
|
||||||
-- This plist files can be created manually or with Particle Designer:<br>
|
-- This plist files can be created manually or with Particle Designer:<br>
|
||||||
-- http:particledesigner.71squared.com/<br>
|
-- http:particledesigner.71squared.com/<br>
|
||||||
-- since v2.0
|
-- since v2.0<br>
|
||||||
|
-- param Particle plist file name.<br>
|
||||||
|
-- return An autoreleased ParticleSystem object.
|
||||||
-- @function [parent=#ParticleSystem] create
|
-- @function [parent=#ParticleSystem] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string plistFile
|
-- @param #string plistFile
|
||||||
-- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem)
|
-- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- create a system with a fixed number of particles
|
-- Create a system with a fixed number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSystemQuad object.
|
||||||
-- @function [parent=#ParticleSystem] createWithTotalParticles
|
-- @function [parent=#ParticleSystem] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets a new SpriteFrame as particle.<br>
|
-- Sets a new SpriteFrame as particle.<br>
|
||||||
-- WARNING: this method is experimental. Use setTextureWithRect instead.<br>
|
-- WARNING: this method is experimental. Use setTextureWithRect instead.<br>
|
||||||
|
-- param spriteFrame A given sprite frame as particle texture.<br>
|
||||||
-- since v0.99.4
|
-- since v0.99.4
|
||||||
-- @function [parent=#ParticleSystemQuad] setDisplayFrame
|
-- @function [parent=#ParticleSystemQuad] setDisplayFrame
|
||||||
-- @param self
|
-- @param self
|
||||||
|
@ -17,7 +18,9 @@
|
||||||
-- Sets a new texture with a rect. The rect is in Points.<br>
|
-- Sets a new texture with a rect. The rect is in Points.<br>
|
||||||
-- since v0.99.4<br>
|
-- since v0.99.4<br>
|
||||||
-- js NA<br>
|
-- js NA<br>
|
||||||
-- lua NA
|
-- lua NA<br>
|
||||||
|
-- param texture A given texture.<br>
|
||||||
|
-- 8 @param rect A given rect, in points.
|
||||||
-- @function [parent=#ParticleSystemQuad] setTextureWithRect
|
-- @function [parent=#ParticleSystemQuad] setTextureWithRect
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Texture2D texture
|
-- @param #cc.Texture2D texture
|
||||||
|
@ -25,9 +28,10 @@
|
||||||
-- @return ParticleSystemQuad#ParticleSystemQuad self (return value: cc.ParticleSystemQuad)
|
-- @return ParticleSystemQuad#ParticleSystemQuad self (return value: cc.ParticleSystemQuad)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- listen the event that renderer was recreated on Android/WP8<br>
|
-- Listen the event that renderer was recreated on Android/WP8.<br>
|
||||||
-- js NA<br>
|
-- js NA<br>
|
||||||
-- lua NA
|
-- lua NA<br>
|
||||||
|
-- param event the event that renderer was recreated on Android/WP8.
|
||||||
-- @function [parent=#ParticleSystemQuad] listenRendererRecreated
|
-- @function [parent=#ParticleSystemQuad] listenRendererRecreated
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.EventCustom event
|
-- @param #cc.EventCustom event
|
||||||
|
@ -43,7 +47,9 @@
|
||||||
-- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad)
|
-- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a Particle Emitter with a number of particles
|
-- Creates a Particle Emitter with a number of particles.<br>
|
||||||
|
-- param numberOfParticles A given number of particles.<br>
|
||||||
|
-- return An autoreleased ParticleSystemQuad object.
|
||||||
-- @function [parent=#ParticleSystemQuad] createWithTotalParticles
|
-- @function [parent=#ParticleSystemQuad] createWithTotalParticles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int numberOfParticles
|
-- @param #int numberOfParticles
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Used for grab part of screen to a texture.rtBegin: the position of renderTexture on the fullRectfullRect: the total size of screenfullViewport: the total viewportSize
|
-- Used for grab part of screen to a texture. <br>
|
||||||
|
-- param rtBegin The position of renderTexture on the fullRect.<br>
|
||||||
|
-- param fullRect The total size of screen.<br>
|
||||||
|
-- param fullViewport The total viewportSize.
|
||||||
-- @function [parent=#RenderTexture] setVirtualViewport
|
-- @function [parent=#RenderTexture] setVirtualViewport
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table rtBegin
|
-- @param #vec2_table rtBegin
|
||||||
|
@ -14,73 +17,82 @@
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- clears the texture with a specified stencil value
|
-- Clears the texture with a specified stencil value.<br>
|
||||||
|
-- param A specified stencil value.
|
||||||
-- @function [parent=#RenderTexture] clearStencil
|
-- @function [parent=#RenderTexture] clearStencil
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int stencilValue
|
-- @param #int stencilValue
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Value for clearDepth. Valid only when "autoDraw" is true.
|
-- Value for clearDepth. Valid only when "autoDraw" is true. <br>
|
||||||
|
-- return Value for clearDepth.
|
||||||
-- @function [parent=#RenderTexture] getClearDepth
|
-- @function [parent=#RenderTexture] getClearDepth
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Value for clear Stencil. Valid only when "autoDraw" is true
|
-- Value for clear Stencil. Valid only when "autoDraw" is true.<br>
|
||||||
|
-- return Value for clear Stencil.
|
||||||
-- @function [parent=#RenderTexture] getClearStencil
|
-- @function [parent=#RenderTexture] getClearStencil
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- ends grabbing
|
-- Ends grabbing.
|
||||||
-- @function [parent=#RenderTexture] end
|
-- @function [parent=#RenderTexture] end
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set Value for clear Stencil.<br>
|
||||||
|
-- param clearStencil Value for clear Stencil.
|
||||||
-- @function [parent=#RenderTexture] setClearStencil
|
-- @function [parent=#RenderTexture] setClearStencil
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int clearStencil
|
-- @param #int clearStencil
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets the Sprite being used.
|
-- Sets the Sprite being used. <br>
|
||||||
|
-- param A Sprite.
|
||||||
-- @function [parent=#RenderTexture] setSprite
|
-- @function [parent=#RenderTexture] setSprite
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Gets the Sprite being used.
|
-- Gets the Sprite being used. <br>
|
||||||
|
-- return A Sprite.
|
||||||
-- @function [parent=#RenderTexture] getSprite
|
-- @function [parent=#RenderTexture] getSprite
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.<br>
|
-- When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.<br>
|
||||||
-- Will be enabled in the future.
|
-- Will be enabled in the future.<br>
|
||||||
|
-- return Return the autoDraw value.
|
||||||
-- @function [parent=#RenderTexture] isAutoDraw
|
-- @function [parent=#RenderTexture] isAutoDraw
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.<br>
|
||||||
|
-- param keepMatrix Wether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
|
||||||
-- @function [parent=#RenderTexture] setKeepMatrix
|
-- @function [parent=#RenderTexture] setKeepMatrix
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool keepMatrix
|
-- @param #bool keepMatrix
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set flags.<br>
|
||||||
|
-- param clearFlags Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT.
|
||||||
-- @function [parent=#RenderTexture] setClearFlags
|
-- @function [parent=#RenderTexture] setClearFlags
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #unsigned int clearFlags
|
-- @param #unsigned int clearFlags
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- starts grabbing
|
-- Starts grabbing.
|
||||||
-- @function [parent=#RenderTexture] begin
|
-- @function [parent=#RenderTexture] begin
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
@ -97,21 +109,23 @@
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set a valve to control whether or not render its children into the texture automatically. <br>
|
||||||
|
-- param isAutoDraw Whether or not render its children into the texture automatically.
|
||||||
-- @function [parent=#RenderTexture] setAutoDraw
|
-- @function [parent=#RenderTexture] setAutoDraw
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #bool isAutoDraw
|
-- @param #bool isAutoDraw
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set color value. <br>
|
||||||
|
-- param clearColor Color value.
|
||||||
-- @function [parent=#RenderTexture] setClearColor
|
-- @function [parent=#RenderTexture] setClearColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #color4f_table clearColor
|
-- @param #color4f_table clearColor
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- end is key word of lua, use other name to export to lua.
|
-- End is key word of lua, use other name to export to lua.
|
||||||
-- @function [parent=#RenderTexture] endToLua
|
-- @function [parent=#RenderTexture] endToLua
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
@ -131,20 +145,26 @@
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- clears the texture with a specified depth value
|
-- Clears the texture with a specified depth value. <br>
|
||||||
|
-- param A specified depth value.
|
||||||
-- @function [parent=#RenderTexture] clearDepth
|
-- @function [parent=#RenderTexture] clearDepth
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float depthValue
|
-- @param #float depthValue
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Clear color value. Valid only when "autoDraw" is true.
|
-- Clear color value. Valid only when "autoDraw" is true. <br>
|
||||||
|
-- return Color value.
|
||||||
-- @function [parent=#RenderTexture] getClearColor
|
-- @function [parent=#RenderTexture] getClearColor
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- clears the texture with a color
|
-- Clears the texture with a color. <br>
|
||||||
|
-- param r Red.<br>
|
||||||
|
-- param g Green.<br>
|
||||||
|
-- param b Blue.<br>
|
||||||
|
-- param a Alpha.
|
||||||
-- @function [parent=#RenderTexture] clear
|
-- @function [parent=#RenderTexture] clear
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float r
|
-- @param #float r
|
||||||
|
@ -154,7 +174,8 @@
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true.
|
-- Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. <br>
|
||||||
|
-- return Clear flags.
|
||||||
-- @function [parent=#RenderTexture] getClearFlags
|
-- @function [parent=#RenderTexture] getClearFlags
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||||
|
@ -166,7 +187,8 @@
|
||||||
-- @return Image#Image ret (return value: cc.Image)
|
-- @return Image#Image ret (return value: cc.Image)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set Value for clearDepth.<br>
|
||||||
|
-- param clearDepth Value for clearDepth.
|
||||||
-- @function [parent=#RenderTexture] setClearDepth
|
-- @function [parent=#RenderTexture] setClearDepth
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float clearDepth
|
-- @param #float clearDepth
|
||||||
|
@ -214,7 +236,9 @@
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- FIXME: should be procted.<br>
|
||||||
|
-- but due to a bug in PowerVR + Android,<br>
|
||||||
|
-- the constructor is public again.
|
||||||
-- @function [parent=#RenderTexture] RenderTexture
|
-- @function [parent=#RenderTexture] RenderTexture
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
-- @return RenderTexture#RenderTexture self (return value: cc.RenderTexture)
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- remove the SpriteData from Sprite3D by given the specified key
|
||||||
-- @function [parent=#Sprite3DCache] removeSprite3DData
|
-- @function [parent=#Sprite3DCache] removeSprite3DData
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string key
|
-- @param #string key
|
||||||
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)
|
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- remove all the SpriteData from Sprite3D
|
||||||
-- @function [parent=#Sprite3DCache] removeAllSprite3DData
|
-- @function [parent=#Sprite3DCache] removeAllSprite3DData
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)
|
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Append the child. <br>
|
||||||
|
-- param sprite A Sprite.
|
||||||
-- @function [parent=#SpriteBatchNode] appendChild
|
-- @function [parent=#SpriteBatchNode] appendChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
|
@ -42,14 +43,19 @@
|
||||||
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the Min image block index,in all child. <br>
|
||||||
|
-- param sprite The parent sprite.<br>
|
||||||
|
-- return Index.
|
||||||
-- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild
|
-- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
-- @return long#long ret (return value: long)
|
-- @return long#long ret (return value: long)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the nearest index from the sprite in z.<br>
|
||||||
|
-- param sprite The parent sprite.<br>
|
||||||
|
-- param z Z order for drawing priority.<br>
|
||||||
|
-- return Index.
|
||||||
-- @function [parent=#SpriteBatchNode] atlasIndexForChild
|
-- @function [parent=#SpriteBatchNode] atlasIndexForChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
|
@ -57,7 +63,8 @@
|
||||||
-- @return long#long ret (return value: long)
|
-- @return long#long ret (return value: long)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- sets the TextureAtlas object
|
-- Sets the TextureAtlas object. <br>
|
||||||
|
-- param textureAtlas The TextureAtlas object.
|
||||||
-- @function [parent=#SpriteBatchNode] setTextureAtlas
|
-- @function [parent=#SpriteBatchNode] setTextureAtlas
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.TextureAtlas textureAtlas
|
-- @param #cc.TextureAtlas textureAtlas
|
||||||
|
@ -70,13 +77,14 @@
|
||||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Increase the Atlas Capacity.
|
||||||
-- @function [parent=#SpriteBatchNode] increaseAtlasCapacity
|
-- @function [parent=#SpriteBatchNode] increaseAtlasCapacity
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the TextureAtlas object
|
-- Returns the TextureAtlas object. <br>
|
||||||
|
-- return The TextureAtlas object.
|
||||||
-- @function [parent=#SpriteBatchNode] getTextureAtlas
|
-- @function [parent=#SpriteBatchNode] getTextureAtlas
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
||||||
|
@ -84,7 +92,7 @@
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.<br>
|
-- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.<br>
|
||||||
-- This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.<br>
|
-- This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.<br>
|
||||||
-- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont)
|
-- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont).
|
||||||
-- @function [parent=#SpriteBatchNode] insertQuadFromSprite
|
-- @function [parent=#SpriteBatchNode] insertQuadFromSprite
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
|
@ -99,7 +107,10 @@
|
||||||
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Rebuild index with a sprite all child. <br>
|
||||||
|
-- param parent The parent sprite.<br>
|
||||||
|
-- param index The child index.<br>
|
||||||
|
-- return Index.
|
||||||
-- @function [parent=#SpriteBatchNode] rebuildIndexInOrder
|
-- @function [parent=#SpriteBatchNode] rebuildIndexInOrder
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite parent
|
-- @param #cc.Sprite parent
|
||||||
|
@ -107,15 +118,19 @@
|
||||||
-- @return long#long ret (return value: long)
|
-- @return long#long ret (return value: long)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the Max image block index,in all child.<br>
|
||||||
|
-- param sprite The parent sprite.<br>
|
||||||
|
-- return Index.
|
||||||
-- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild
|
-- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
-- @return long#long ret (return value: long)
|
-- @return long#long ret (return value: long)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.<br>
|
-- Removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.<br>
|
||||||
-- warning Removing a child from a SpriteBatchNode is very slow
|
-- param index A certain index.<br>
|
||||||
|
-- param doCleanup Whether or not to cleanup the running actions.<br>
|
||||||
|
-- warning Removing a child from a SpriteBatchNode is very slow.
|
||||||
-- @function [parent=#SpriteBatchNode] removeChildAtIndex
|
-- @function [parent=#SpriteBatchNode] removeChildAtIndex
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #long index
|
-- @param #long index
|
||||||
|
@ -123,7 +138,8 @@
|
||||||
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Remove a sprite from Atlas. <br>
|
||||||
|
-- param sprite A Sprite.
|
||||||
-- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas
|
-- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
|
@ -131,8 +147,8 @@
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- code<br>
|
-- code<br>
|
||||||
-- When this function bound into js or lua,the parameter will be changed<br>
|
-- When this function bound into js or lua,the parameter will be changed.<br>
|
||||||
-- In js: var setBlendFunc(var src, var dst)<br>
|
-- In js: var setBlendFunc(var src, var dst).<br>
|
||||||
-- endcode<br>
|
-- endcode<br>
|
||||||
-- lua NA
|
-- lua NA
|
||||||
-- @function [parent=#SpriteBatchNode] setBlendFunc
|
-- @function [parent=#SpriteBatchNode] setBlendFunc
|
||||||
|
@ -141,9 +157,12 @@
|
||||||
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.<br>
|
-- Creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.<br>
|
||||||
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
||||||
-- The file will be loaded using the TextureMgr.
|
-- The file will be loaded using the TextureMgr.<br>
|
||||||
|
-- param fileImage A file image (.png, .jpeg, .pvr, etc).<br>
|
||||||
|
-- param capacity The capacity of children.<br>
|
||||||
|
-- return Return an autorelease object.
|
||||||
-- @function [parent=#SpriteBatchNode] create
|
-- @function [parent=#SpriteBatchNode] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string fileImage
|
-- @param #string fileImage
|
||||||
|
@ -151,8 +170,11 @@
|
||||||
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a SpriteBatchNode with a texture2d and capacity of children.<br>
|
-- Creates a SpriteBatchNode with a texture2d and capacity of children.<br>
|
||||||
-- The capacity will be increased in 33% in runtime if it runs out of space.
|
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
||||||
|
-- param tex A texture2d.<br>
|
||||||
|
-- param capacity The capacity of children.<br>
|
||||||
|
-- return Return an autorelease object.
|
||||||
-- @function [parent=#SpriteBatchNode] createWithTexture
|
-- @function [parent=#SpriteBatchNode] createWithTexture
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Texture2D tex
|
-- @param #cc.Texture2D tex
|
||||||
|
|
|
@ -5,54 +5,63 @@
|
||||||
-- @parent_module ccexp
|
-- @parent_module ccexp
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the position in points of a given tile coordinate
|
-- Returns the position in points of a given tile coordinate.<br>
|
||||||
|
-- param tileCoordinate The tile Coordinate.<br>
|
||||||
|
-- return The position in points of a given tile coordinate.
|
||||||
-- @function [parent=#TMXLayer] getPositionAt
|
-- @function [parent=#TMXLayer] getPositionAt
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table tileCoordinate
|
-- @param #vec2_table tileCoordinate
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set Layer orientation, which is the same as the map orientation. <br>
|
||||||
|
-- param orientation Layer orientation, which is the same as the map orientation.
|
||||||
-- @function [parent=#TMXLayer] setLayerOrientation
|
-- @function [parent=#TMXLayer] setLayerOrientation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int orientation
|
-- @param #int orientation
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- size of the layer in tiles
|
-- Size of the layer in tiles.<br>
|
||||||
|
-- return Size of the layer in tiles.
|
||||||
-- @function [parent=#TMXLayer] getLayerSize
|
-- @function [parent=#TMXLayer] getLayerSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return size_table#size_table ret (return value: size_table)
|
-- @return size_table#size_table ret (return value: size_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the size of the map's tile. <br>
|
||||||
|
-- param size The new size of the map's tile.
|
||||||
-- @function [parent=#TMXLayer] setMapTileSize
|
-- @function [parent=#TMXLayer] setMapTileSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table size
|
-- @param #size_table size
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Layer orientation, which is the same as the map orientation
|
-- Layer orientation, which is the same as the map orientation.<br>
|
||||||
|
-- return Layer orientation, which is the same as the map orientation.
|
||||||
-- @function [parent=#TMXLayer] getLayerOrientation
|
-- @function [parent=#TMXLayer] getLayerOrientation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the properties to the layer.<br>
|
||||||
|
-- param properties The properties to the layer.
|
||||||
-- @function [parent=#TMXLayer] setProperties
|
-- @function [parent=#TMXLayer] setProperties
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #map_table properties
|
-- @param #map_table properties
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the tile layer name.<br>
|
||||||
|
-- param layerName The new layer name.
|
||||||
-- @function [parent=#TMXLayer] setLayerName
|
-- @function [parent=#TMXLayer] setLayerName
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string layerName
|
-- @param #string layerName
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- removes a tile at given tile coordinate
|
-- Removes a tile at given tile coordinate.<br>
|
||||||
|
-- param tileCoordinate The tile Coordinate.
|
||||||
-- @function [parent=#TMXLayer] removeTileAt
|
-- @function [parent=#TMXLayer] removeTileAt
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table tileCoordinate
|
-- @param #vec2_table tileCoordinate
|
||||||
|
@ -66,13 +75,16 @@
|
||||||
-- @return map_table#map_table ret (return value: map_table)
|
-- @return map_table#map_table ret (return value: map_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Creates the tiles
|
-- Creates the tiles.
|
||||||
-- @function [parent=#TMXLayer] setupTiles
|
-- @function [parent=#TMXLayer] setupTiles
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set an sprite to the tile,with the tile coordinate and gid.<br>
|
||||||
|
-- param sprite A Sprite.<br>
|
||||||
|
-- param pos The tile coordinate.<br>
|
||||||
|
-- param gid The tile gid.
|
||||||
-- @function [parent=#TMXLayer] setupTileSprite
|
-- @function [parent=#TMXLayer] setupTileSprite
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.Sprite sprite
|
-- @param #cc.Sprite sprite
|
||||||
|
@ -91,57 +103,69 @@
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- size of the map's tile (could be different from the tile's size)
|
-- Size of the map's tile (could be different from the tile's size).<br>
|
||||||
|
-- return Size of the map's tile (could be different from the tile's size).
|
||||||
-- @function [parent=#TMXLayer] getMapTileSize
|
-- @function [parent=#TMXLayer] getMapTileSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return size_table#size_table ret (return value: size_table)
|
-- @return size_table#size_table ret (return value: size_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the value for the specific property name
|
-- Return the value for the specific property name.<br>
|
||||||
|
-- param propertyName The value for the specific property name.<br>
|
||||||
|
-- return The value for the specific property name.
|
||||||
-- @function [parent=#TMXLayer] getProperty
|
-- @function [parent=#TMXLayer] getProperty
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string propertyName
|
-- @param #string propertyName
|
||||||
-- @return Value#Value ret (return value: cc.Value)
|
-- @return Value#Value ret (return value: cc.Value)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the size of the layer in tiles. <br>
|
||||||
|
-- param size The new size of the layer in tiles.
|
||||||
-- @function [parent=#TMXLayer] setLayerSize
|
-- @function [parent=#TMXLayer] setLayerSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table size
|
-- @param #size_table size
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the tile layer name.<br>
|
||||||
|
-- return The tile layer name.
|
||||||
-- @function [parent=#TMXLayer] getLayerName
|
-- @function [parent=#TMXLayer] getLayerName
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return string#string ret (return value: string)
|
-- @return string#string ret (return value: string)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the tileset information for the layer. <br>
|
||||||
|
-- param info The new tileset information for the layer.
|
||||||
-- @function [parent=#TMXLayer] setTileSet
|
-- @function [parent=#TMXLayer] setTileSet
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.TMXTilesetInfo info
|
-- @param #cc.TMXTilesetInfo info
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer self (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Tileset information for the layer
|
-- Tileset information for the layer.<br>
|
||||||
|
-- return Tileset information for the layer.
|
||||||
-- @function [parent=#TMXLayer] getTileSet
|
-- @function [parent=#TMXLayer] getTileSet
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo)
|
-- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the tile (Sprite) at a given a tile coordinate.<br>
|
-- Returns the tile (Sprite) at a given a tile coordinate.<br>
|
||||||
-- The returned Sprite will be already added to the TMXLayer. Don't add it again.<br>
|
-- The returned Sprite will be already added to the TMXLayer. Don't add it again.<br>
|
||||||
-- The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.<br>
|
-- The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.<br>
|
||||||
-- You can remove either by calling:<br>
|
-- You can remove either by calling:<br>
|
||||||
-- - layer->removeChild(sprite, cleanup);
|
-- - layer->removeChild(sprite, cleanup);<br>
|
||||||
|
-- return Returns the tile (Sprite) at a given a tile coordinate.
|
||||||
-- @function [parent=#TMXLayer] getTileAt
|
-- @function [parent=#TMXLayer] getTileAt
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table tileCoordinate
|
-- @param #vec2_table tileCoordinate
|
||||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a FastTMXLayer with an tileset info, a layer info and a map info
|
-- Creates a FastTMXLayer with an tileset info, a layer info and a map info.<br>
|
||||||
|
-- param tilesetInfo An tileset info.<br>
|
||||||
|
-- param layerInfo A layer info.<br>
|
||||||
|
-- param mapInfo A map info.<br>
|
||||||
|
-- return Reruen an autorelease object.
|
||||||
-- @function [parent=#TMXLayer] create
|
-- @function [parent=#TMXLayer] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.TMXTilesetInfo tilesetInfo
|
-- @param #cc.TMXTilesetInfo tilesetInfo
|
||||||
|
|
|
@ -5,28 +5,33 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets the offset position of child objects
|
-- Sets the offset position of child objects. <br>
|
||||||
|
-- param offset The offset position of child objects.
|
||||||
-- @function [parent=#TMXObjectGroup] setPositionOffset
|
-- @function [parent=#TMXObjectGroup] setPositionOffset
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #vec2_table offset
|
-- @param #vec2_table offset
|
||||||
-- @return TMXObjectGroup#TMXObjectGroup self (return value: cc.TMXObjectGroup)
|
-- @return TMXObjectGroup#TMXObjectGroup self (return value: cc.TMXObjectGroup)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the value for the specific property name
|
-- Return the value for the specific property name. <br>
|
||||||
|
-- param propertyName The specific property name.<br>
|
||||||
|
-- return Return the value for the specific property name.
|
||||||
-- @function [parent=#TMXObjectGroup] getProperty
|
-- @function [parent=#TMXObjectGroup] getProperty
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string propertyName
|
-- @param #string propertyName
|
||||||
-- @return Value#Value ret (return value: cc.Value)
|
-- @return Value#Value ret (return value: cc.Value)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Gets the offset position of child objects
|
-- Gets the offset position of child objects. <br>
|
||||||
|
-- return The offset position of child objects.
|
||||||
-- @function [parent=#TMXObjectGroup] getPositionOffset
|
-- @function [parent=#TMXObjectGroup] getPositionOffset
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the dictionary for the specific object name.<br>
|
-- Return the dictionary for the specific object name.<br>
|
||||||
-- It will return the 1st object found on the array for the given name.
|
-- It will return the 1st object found on the array for the given name.<br>
|
||||||
|
-- return Return the dictionary for the specific object name.
|
||||||
-- @function [parent=#TMXObjectGroup] getObject
|
-- @function [parent=#TMXObjectGroup] getObject
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string objectName
|
-- @param #string objectName
|
||||||
|
@ -40,7 +45,8 @@
|
||||||
-- @return array_table#array_table ret (return value: array_table)
|
-- @return array_table#array_table ret (return value: array_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the group name. <br>
|
||||||
|
-- param groupname A string,it is used to set the group name.
|
||||||
-- @function [parent=#TMXObjectGroup] setGroupName
|
-- @function [parent=#TMXObjectGroup] setGroupName
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string groupName
|
-- @param #string groupName
|
||||||
|
@ -54,20 +60,23 @@
|
||||||
-- @return map_table#map_table ret (return value: map_table)
|
-- @return map_table#map_table ret (return value: map_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Get the group name. <br>
|
||||||
|
-- return The group name.
|
||||||
-- @function [parent=#TMXObjectGroup] getGroupName
|
-- @function [parent=#TMXObjectGroup] getGroupName
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return string#string ret (return value: string)
|
-- @return string#string ret (return value: string)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets the list of properties
|
-- Sets the list of properties.<br>
|
||||||
|
-- param properties The list of properties.
|
||||||
-- @function [parent=#TMXObjectGroup] setProperties
|
-- @function [parent=#TMXObjectGroup] setProperties
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #map_table properties
|
-- @param #map_table properties
|
||||||
-- @return TMXObjectGroup#TMXObjectGroup self (return value: cc.TMXObjectGroup)
|
-- @return TMXObjectGroup#TMXObjectGroup self (return value: cc.TMXObjectGroup)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Sets the array of the objects
|
-- Sets the array of the objects.<br>
|
||||||
|
-- param objects The array of the objects.
|
||||||
-- @function [parent=#TMXObjectGroup] setObjects
|
-- @function [parent=#TMXObjectGroup] setObjects
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #array_table objects
|
-- @param #array_table objects
|
||||||
|
|
|
@ -5,28 +5,32 @@
|
||||||
-- @parent_module ccexp
|
-- @parent_module ccexp
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set object groups. <br>
|
||||||
|
-- param groups An object groups.
|
||||||
-- @function [parent=#TMXTiledMap] setObjectGroups
|
-- @function [parent=#TMXTiledMap] setObjectGroups
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #array_table groups
|
-- @param #array_table groups
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the value for the specific property name
|
-- Return the value for the specific property name.<br>
|
||||||
|
-- return Return the value for the specific property name.
|
||||||
-- @function [parent=#TMXTiledMap] getProperty
|
-- @function [parent=#TMXTiledMap] getProperty
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string propertyName
|
-- @param #string propertyName
|
||||||
-- @return Value#Value ret (return value: cc.Value)
|
-- @return Value#Value ret (return value: cc.Value)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the map's size property measured in tiles.<br>
|
||||||
|
-- param mapSize The map's size property measured in tiles.
|
||||||
-- @function [parent=#TMXTiledMap] setMapSize
|
-- @function [parent=#TMXTiledMap] setMapSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table mapSize
|
-- @param #size_table mapSize
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the TMXObjectGroup for the specific group
|
-- Return the TMXObjectGroup for the specific group. <br>
|
||||||
|
-- return Return the TMXObjectGroup for the specific group.
|
||||||
-- @function [parent=#TMXTiledMap] getObjectGroup
|
-- @function [parent=#TMXTiledMap] getObjectGroup
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string groupName
|
-- @param #string groupName
|
||||||
|
@ -40,73 +44,86 @@
|
||||||
-- @return array_table#array_table ret (return value: array_table)
|
-- @return array_table#array_table ret (return value: array_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- the tiles's size property measured in pixels
|
-- The tiles's size property measured in pixels.<br>
|
||||||
|
-- return The tiles's size property measured in pixels.
|
||||||
-- @function [parent=#TMXTiledMap] getTileSize
|
-- @function [parent=#TMXTiledMap] getTileSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return size_table#size_table ret (return value: size_table)
|
-- @return size_table#size_table ret (return value: size_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- the map's size property measured in tiles
|
-- The map's size property measured in tiles. <br>
|
||||||
|
-- return The map's size property measured in tiles.
|
||||||
-- @function [parent=#TMXTiledMap] getMapSize
|
-- @function [parent=#TMXTiledMap] getMapSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return size_table#size_table ret (return value: size_table)
|
-- @return size_table#size_table ret (return value: size_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- properties
|
-- Get properties.<br>
|
||||||
|
-- return Properties.
|
||||||
-- @function [parent=#TMXTiledMap] getProperties
|
-- @function [parent=#TMXTiledMap] getProperties
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return map_table#map_table ret (return value: map_table)
|
-- @return map_table#map_table ret (return value: map_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return properties dictionary for tile GID
|
-- Return properties dictionary for tile GID.<br>
|
||||||
|
-- return Return properties dictionary for tile GID.
|
||||||
-- @function [parent=#TMXTiledMap] getPropertiesForGID
|
-- @function [parent=#TMXTiledMap] getPropertiesForGID
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int GID
|
-- @param #int GID
|
||||||
-- @return Value#Value ret (return value: cc.Value)
|
-- @return Value#Value ret (return value: cc.Value)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the tiles's size property measured in pixels. <br>
|
||||||
|
-- param tileSize The tiles's size property measured in pixels.
|
||||||
-- @function [parent=#TMXTiledMap] setTileSize
|
-- @function [parent=#TMXTiledMap] setTileSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table tileSize
|
-- @param #size_table tileSize
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set properties. <br>
|
||||||
|
-- param properties An ValueMap Properties.
|
||||||
-- @function [parent=#TMXTiledMap] setProperties
|
-- @function [parent=#TMXTiledMap] setProperties
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #map_table properties
|
-- @param #map_table properties
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- return the FastTMXLayer for the specific layer
|
-- Return the FastTMXLayer for the specific layer. <br>
|
||||||
|
-- return Return the FastTMXLayer for the specific layer.
|
||||||
-- @function [parent=#TMXTiledMap] getLayer
|
-- @function [parent=#TMXTiledMap] getLayer
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string layerName
|
-- @param #string layerName
|
||||||
-- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer)
|
-- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- map orientation
|
-- Get map orientation. <br>
|
||||||
|
-- return The map orientation.
|
||||||
-- @function [parent=#TMXTiledMap] getMapOrientation
|
-- @function [parent=#TMXTiledMap] getMapOrientation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set map orientation. <br>
|
||||||
|
-- param mapOrientation The map orientation.
|
||||||
-- @function [parent=#TMXTiledMap] setMapOrientation
|
-- @function [parent=#TMXTiledMap] setMapOrientation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int mapOrientation
|
-- @param #int mapOrientation
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap self (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a TMX Tiled Map with a TMX file.
|
-- Creates a TMX Tiled Map with a TMX file.<br>
|
||||||
|
-- return An autorelease object.
|
||||||
-- @function [parent=#TMXTiledMap] create
|
-- @function [parent=#TMXTiledMap] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string tmxFile
|
-- @param #string tmxFile
|
||||||
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap)
|
-- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources
|
-- Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources. <br>
|
||||||
|
-- param tmxString A TMX formatted XML string.<br>
|
||||||
|
-- param resourcePath A path to TMX resources.<br>
|
||||||
|
-- return An autorelease object.
|
||||||
-- @function [parent=#TMXTiledMap] createWithXML
|
-- @function [parent=#TMXTiledMap] createWithXML
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string tmxString
|
-- @param #string tmxString
|
||||||
|
|
|
@ -5,44 +5,54 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the previous touch location in screen coordinates
|
-- Returns the previous touch location in screen coordinates. <br>
|
||||||
|
-- return The previous touch location in screen coordinates.
|
||||||
-- @function [parent=#Touch] getPreviousLocationInView
|
-- @function [parent=#Touch] getPreviousLocationInView
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the current touch location in OpenGL coordinates
|
-- Returns the current touch location in OpenGL coordinates.<br>
|
||||||
|
-- return The current touch location in OpenGL coordinates.
|
||||||
-- @function [parent=#Touch] getLocation
|
-- @function [parent=#Touch] getLocation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the delta of 2 current touches locations in screen coordinates
|
-- Returns the delta of 2 current touches locations in screen coordinates.<br>
|
||||||
|
-- return The delta of 2 current touches locations in screen coordinates.
|
||||||
-- @function [parent=#Touch] getDelta
|
-- @function [parent=#Touch] getDelta
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the start touch location in screen coordinates
|
-- Returns the start touch location in screen coordinates.<br>
|
||||||
|
-- return The start touch location in screen coordinates.
|
||||||
-- @function [parent=#Touch] getStartLocationInView
|
-- @function [parent=#Touch] getStartLocationInView
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the start touch location in OpenGL coordinates
|
-- Returns the start touch location in OpenGL coordinates.<br>
|
||||||
|
-- return The start touch location in OpenGL coordinates.
|
||||||
-- @function [parent=#Touch] getStartLocation
|
-- @function [parent=#Touch] getStartLocation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
-- Get touch id.<br>
|
||||||
-- js getId<br>
|
-- js getId<br>
|
||||||
-- lua getId
|
-- lua getId<br>
|
||||||
|
-- return The id of touch.
|
||||||
-- @function [parent=#Touch] getID
|
-- @function [parent=#Touch] getID
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return int#int ret (return value: int)
|
-- @return int#int ret (return value: int)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Set the touch infomation. It always used to monitor touch event.<br>
|
||||||
|
-- param id A given id<br>
|
||||||
|
-- param x A given x coordinate.<br>
|
||||||
|
-- param y A given y coordinate.
|
||||||
-- @function [parent=#Touch] setTouchInfo
|
-- @function [parent=#Touch] setTouchInfo
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int id
|
-- @param #int id
|
||||||
|
@ -51,19 +61,21 @@
|
||||||
-- @return Touch#Touch self (return value: cc.Touch)
|
-- @return Touch#Touch self (return value: cc.Touch)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the current touch location in screen coordinates
|
-- Returns the current touch location in screen coordinates.<br>
|
||||||
|
-- return The current touch location in screen coordinates.
|
||||||
-- @function [parent=#Touch] getLocationInView
|
-- @function [parent=#Touch] getLocationInView
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the previous touch location in OpenGL coordinates
|
-- Returns the previous touch location in OpenGL coordinates.<br>
|
||||||
|
-- return The previous touch location in OpenGL coordinates.
|
||||||
-- @function [parent=#Touch] getPreviousLocation
|
-- @function [parent=#Touch] getPreviousLocation
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Constructor.
|
||||||
-- @function [parent=#Touch] Touch
|
-- @function [parent=#Touch] Touch
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Touch#Touch self (return value: cc.Touch)
|
-- @return Touch#Touch self (return value: cc.Touch)
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionCrossFade object.
|
||||||
-- @function [parent=#TransitionCrossFade] create
|
-- @function [parent=#TransitionCrossFade] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the Ease action that will be performed on a linear action.<br>
|
-- Returns the Ease action that will be performed on a linear action.<br>
|
||||||
-- since v0.8.2
|
-- since v0.8.2<br>
|
||||||
|
-- param action A given interval action.<br>
|
||||||
|
-- return The Ease action that will be performed on a linear action.
|
||||||
-- @function [parent=#TransitionEaseScene] easeActionWithAction
|
-- @function [parent=#TransitionEaseScene] easeActionWithAction
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #cc.ActionInterval action
|
-- @param #cc.ActionInterval action
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionFadeBL object.
|
||||||
-- @function [parent=#TransitionFadeBL] create
|
-- @function [parent=#TransitionFadeBL] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionFadeDown object.
|
||||||
-- @function [parent=#TransitionFadeDown] create
|
-- @function [parent=#TransitionFadeDown] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -12,14 +12,19 @@
|
||||||
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Returns the action that will be performed with size.<br>
|
||||||
|
-- param size A given size.<br>
|
||||||
|
-- return The action that will be performed.
|
||||||
-- @function [parent=#TransitionFadeTR] actionWithSize
|
-- @function [parent=#TransitionFadeTR] actionWithSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table size
|
-- @param #size_table size
|
||||||
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionFadeTR object.
|
||||||
-- @function [parent=#TransitionFadeTR] create
|
-- @function [parent=#TransitionFadeTR] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionFadeUp object.
|
||||||
-- @function [parent=#TransitionFadeUp] create
|
-- @function [parent=#TransitionFadeUp] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionJumpZoom object.
|
||||||
-- @function [parent=#TransitionJumpZoom] create
|
-- @function [parent=#TransitionJumpZoom] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionMoveInB object.
|
||||||
-- @function [parent=#TransitionMoveInB] create
|
-- @function [parent=#TransitionMoveInB] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- returns the action that will be performed
|
-- Returns the action that will be performed. <br>
|
||||||
|
-- return The action that will be performed.
|
||||||
-- @function [parent=#TransitionMoveInL] action
|
-- @function [parent=#TransitionMoveInL] action
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
||||||
|
@ -18,7 +19,10 @@
|
||||||
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionMoveInL object.
|
||||||
-- @function [parent=#TransitionMoveInL] create
|
-- @function [parent=#TransitionMoveInL] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionMoveInR object.
|
||||||
-- @function [parent=#TransitionMoveInR] create
|
-- @function [parent=#TransitionMoveInR] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionMoveInT object.
|
||||||
-- @function [parent=#TransitionMoveInT] create
|
-- @function [parent=#TransitionMoveInT] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Returns the action that will be performed with size.<br>
|
||||||
|
-- param size A given size.<br>
|
||||||
|
-- return The action that will be performed.
|
||||||
-- @function [parent=#TransitionPageTurn] actionWithSize
|
-- @function [parent=#TransitionPageTurn] actionWithSize
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #size_table vector
|
-- @param #size_table vector
|
||||||
|
@ -13,8 +15,12 @@
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Creates a base transition with duration and incoming scene.<br>
|
-- Creates a base transition with duration and incoming scene.<br>
|
||||||
-- If back is true then the effect is reversed to appear as if the incoming <br>
|
-- If back is true then the effect is reversed to appear as if the incoming<br>
|
||||||
-- scene is being turned from left over the outgoing scene.
|
-- scene is being turned from left over the outgoing scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.<br>
|
||||||
|
-- return True if initialize success.
|
||||||
-- @function [parent=#TransitionPageTurn] initWithDuration
|
-- @function [parent=#TransitionPageTurn] initWithDuration
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
@ -25,7 +31,11 @@
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- Creates a base transition with duration and incoming scene.<br>
|
-- Creates a base transition with duration and incoming scene.<br>
|
||||||
-- If back is true then the effect is reversed to appear as if the incoming<br>
|
-- If back is true then the effect is reversed to appear as if the incoming<br>
|
||||||
-- scene is being turned from left over the outgoing scene.
|
-- scene is being turned from left over the outgoing scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.<br>
|
||||||
|
-- return An autoreleased TransitionPageTurn object.
|
||||||
-- @function [parent=#TransitionPageTurn] create
|
-- @function [parent=#TransitionPageTurn] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgress object.
|
||||||
-- @function [parent=#TransitionProgress] create
|
-- @function [parent=#TransitionProgress] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressHorizontal object.
|
||||||
-- @function [parent=#TransitionProgressHorizontal] create
|
-- @function [parent=#TransitionProgressHorizontal] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressInOut object.
|
||||||
-- @function [parent=#TransitionProgressInOut] create
|
-- @function [parent=#TransitionProgressInOut] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressOutIn object.
|
||||||
-- @function [parent=#TransitionProgressOutIn] create
|
-- @function [parent=#TransitionProgressOutIn] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressRadialCCW object.
|
||||||
-- @function [parent=#TransitionProgressRadialCCW] create
|
-- @function [parent=#TransitionProgressRadialCCW] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressRadialCW object.
|
||||||
-- @function [parent=#TransitionProgressRadialCW] create
|
-- @function [parent=#TransitionProgressRadialCW] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return An autoreleased TransitionProgressVertical object.
|
||||||
-- @function [parent=#TransitionProgressVertical] create
|
-- @function [parent=#TransitionProgressVertical] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionRotoZoom object.
|
||||||
-- @function [parent=#TransitionRotoZoom] create
|
-- @function [parent=#TransitionRotoZoom] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,19 +5,22 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- called after the transition finishes
|
-- Called after the transition finishes.
|
||||||
-- @function [parent=#TransitionScene] finish
|
-- @function [parent=#TransitionScene] finish
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return TransitionScene#TransitionScene self (return value: cc.TransitionScene)
|
-- @return TransitionScene#TransitionScene self (return value: cc.TransitionScene)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- used by some transitions to hide the outer scene
|
-- Used by some transitions to hide the outer scene.
|
||||||
-- @function [parent=#TransitionScene] hideOutShowIn
|
-- @function [parent=#TransitionScene] hideOutShowIn
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return TransitionScene#TransitionScene self (return value: cc.TransitionScene)
|
-- @return TransitionScene#TransitionScene self (return value: cc.TransitionScene)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a base transition with duration and incoming scene
|
-- Creates a base transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionScene object.
|
||||||
-- @function [parent=#TransitionScene] create
|
-- @function [parent=#TransitionScene] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,11 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- creates a base transition with duration and incoming scene
|
-- Creates a transition with duration, incoming scene and orientation.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- param orientation A given orientation: LeftOver, RightOver, UpOver, DownOver.<br>
|
||||||
|
-- return A autoreleased TransitionSceneOriented object.
|
||||||
-- @function [parent=#TransitionSceneOriented] create
|
-- @function [parent=#TransitionSceneOriented] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -12,7 +12,10 @@
|
||||||
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionShrinkGrow object.
|
||||||
-- @function [parent=#TransitionShrinkGrow] create
|
-- @function [parent=#TransitionShrinkGrow] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
-- @parent_module cc
|
-- @parent_module cc
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
-- Creates a transition with duration and incoming scene.<br>
|
||||||
|
-- param t Duration time, in seconds.<br>
|
||||||
|
-- param scene A given scene.<br>
|
||||||
|
-- return A autoreleased TransitionSlideInB object.
|
||||||
-- @function [parent=#TransitionSlideInB] create
|
-- @function [parent=#TransitionSlideInB] create
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #float t
|
-- @param #float t
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue