Classes | |
class | AnimationFrame |
AnimationFrame A frame of the animation. More... | |
struct | AnimationFrame::DisplayedEventInfo |
class | Animation |
A Animation object is used to perform animations on the Sprite objects. More... | |
class | AnimationCache |
Singleton that manages the Animations. More... | |
class | Sprite |
Sprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) ) More... | |
class | SpriteBatchNode |
SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw"). More... | |
class | SpriteFrame |
A SpriteFrame has: More... | |
class | SpriteFrameCache |
Singleton that handles the loading of the sprite frames. More... | |
Functions | |
bool | isFlipY () |
void | setFlipY (bool flippedY) |
var | setFlipY ( var flippedY) |
local | setFlipY ( local flippedY) |
virtual std::string | getDescription () const override |
Gets the description string. More... | |
var | getDescription () |
Gets the description string. More... | |
local | getDescription () |
Gets the description string. More... | |
virtual | ~Sprite (void) |
var | ~Sprite () |
local | ~Sprite () |
virtual bool | init (void) |
var | init () |
local | init () |
virtual bool | initWithTexture (Texture2D *texture) |
Initializes a sprite with a texture. More... | |
local | initWithTexture ( local texture) |
Initializes a sprite with a texture. More... | |
virtual bool | initWithTexture (Texture2D *texture, const Rect &rect) |
Initializes a sprite with a texture and a rect. More... | |
var | initWithTexture ( var texture, var rect) |
Initializes a sprite with a texture and a rect. More... | |
local | initWithTexture ( local texture, local rect) |
Initializes a sprite with a texture and a rect. More... | |
virtual bool | initWithTexture (Texture2D *texture, const Rect &rect, bool rotated) |
Initializes a sprite with a texture and a rect in points, optionally rotated. More... | |
local | initWithTexture ( local texture, local rect, local rotated) |
Initializes a sprite with a texture and a rect in points, optionally rotated. More... | |
virtual bool | initWithSpriteFrame (SpriteFrame *pSpriteFrame) |
Initializes a sprite with an SpriteFrame. More... | |
virtual bool | initWithSpriteFrameName (const std::string &spriteFrameName) |
Initializes a sprite with an sprite frame name. More... | |
var | initWithSpriteFrameName ( var spriteFrameName) |
Initializes a sprite with an sprite frame name. More... | |
local | initWithSpriteFrameName ( local spriteFrameName) |
Initializes a sprite with an sprite frame name. More... | |
virtual bool | initWithFile (const std::string &filename) |
Initializes a sprite with an image filename. More... | |
virtual bool | initWithFile (const std::string &filename, const Rect &rect) |
Initializes a sprite with an image filename, and a rect. More... | |
var | init ( var filename, var rect) |
Initializes a sprite with an image filename, and a rect. More... | |
local | init ( local filename, local rect) |
Initializes a sprite with an image filename, and a rect. More... | |
void | updateColor (void) |
var | updateColor () |
local | updateColor () |
virtual void | setTextureCoords (Rect rect) |
local | setTextureCoords ( local rect) |
virtual void | updateBlendFunc (void) |
var | updateBlendFunc () |
local | updateBlendFunc () |
virtual void | setReorderChildDirtyRecursively (void) |
local | setReorderChildDirtyRecursively () |
virtual void | setDirtyRecursively (bool bValue) |
var | setDirtyRecursively ( var bValue) |
local | setDirtyRecursively ( local bValue) |
Variables | |
CC_CONSTRUCTOR_ACCESS | __pad0__: Sprite(void) |
local | __pad0__: Sprite(void) |
TextureAtlas * | _textureAtlas |
ssize_t | _atlasIndex |
SpriteBatchNode texture atlas (weak reference) More... | |
var | _atlasIndex |
SpriteBatchNode texture atlas (weak reference) More... | |
local | _atlasIndex |
SpriteBatchNode texture atlas (weak reference) More... | |
SpriteBatchNode * | _batchNode |
Absolute (real) Index on the SpriteSheet. More... | |
var | _batchNode |
Absolute (real) Index on the SpriteSheet. More... | |
local | _batchNode |
Absolute (real) Index on the SpriteSheet. More... | |
bool | _dirty |
Used batch node (weak reference) More... | |
var | _dirty |
Used batch node (weak reference) More... | |
local | _dirty |
Used batch node (weak reference) More... | |
bool | _recursiveDirty |
Whether the sprite needs to be updated. More... | |
var | _recursiveDirty |
Whether the sprite needs to be updated. More... | |
local | _recursiveDirty |
Whether the sprite needs to be updated. More... | |
bool | _shouldBeHidden |
Whether all of the sprite's children needs to be updated. More... | |
var | _shouldBeHidden |
Whether all of the sprite's children needs to be updated. More... | |
local | _shouldBeHidden |
Whether all of the sprite's children needs to be updated. More... | |
Mat4 | _transformToBatch |
should not be drawn because one of the ancestors is not visible More... | |
BlendFunc | _blendFunc |
var | _blendFunc |
local | _blendFunc |
Texture2D * | _texture |
It's required for TextureProtocol inheritance. More... | |
var | _texture |
It's required for TextureProtocol inheritance. More... | |
local | _texture |
It's required for TextureProtocol inheritance. More... | |
QuadCommand | _quadCommand |
Texture2D object that is used to render the sprite. More... | |
var | _quadCommand |
Texture2D object that is used to render the sprite. More... | |
local | _quadCommand |
Texture2D object that is used to render the sprite. More... | |
Rect | _rect |
quad command More... | |
var | _rect |
quad command More... | |
local | _rect |
quad command More... | |
bool | _rectRotated |
Retangle of Texture2D. More... | |
var | _rectRotated |
Retangle of Texture2D. More... | |
local | _rectRotated |
Retangle of Texture2D. More... | |
Vec2 | _offsetPosition |
Whether the texture is rotated. More... | |
var | _offsetPosition |
Whether the texture is rotated. More... | |
local | _offsetPosition |
Whether the texture is rotated. More... | |
Vec2 | _unflippedOffsetPositionFromCenter |
var | _unflippedOffsetPositionFromCenter |
local | _unflippedOffsetPositionFromCenter |
V3F_C4B_T2F_Quad | _quad |
local | _quad |
bool | _opacityModifyRGB |
var | _opacityModifyRGB |
local | _opacityModifyRGB |
bool | _flippedX |
var | _flippedX |
local | _flippedX |
bool | _flippedY |
Whether the sprite is flipped horizontally or not. More... | |
var | _flippedY |
Whether the sprite is flipped horizontally or not. More... | |
local | _flippedY |
Whether the sprite is flipped horizontally or not. More... | |
bool | _insideBounds |
Whether the sprite is flipped vertically or not. More... | |
var | _insideBounds |
Whether the sprite is flipped vertically or not. More... | |
local | _insideBounds |
Whether the sprite is flipped vertically or not. More... | |
Creators | |
Sprite invalid index on the SpriteBatchNode | |
static Sprite * | create () |
Creates an empty sprite without texture. More... | |
static Sprite * | create (const std::string &filename) |
Creates a sprite with an image filename. More... | |
var | create ( var filename) |
Creates a sprite with an image filename. More... | |
local | create ( local filename) |
Creates a sprite with an image filename. More... | |
static Sprite * | create (const std::string &filename, const Rect &rect) |
Creates a sprite with an image filename and a rect. More... | |
var | create ( var filename, var rect) |
Creates a sprite with an image filename and a rect. More... | |
local | create ( local filename, local rect) |
Creates a sprite with an image filename and a rect. More... | |
static Sprite * | createWithTexture (Texture2D *texture) |
Creates a sprite with a Texture2D object. More... | |
static Sprite * | createWithTexture (Texture2D *texture, const Rect &rect, bool rotated=false) |
Creates a sprite with a texture and a rect. More... | |
var | createWithTexture ( var texture, var rect, var false) |
Creates a sprite with a texture and a rect. More... | |
local | createWithTexture ( local texture, local rect, local false) |
Creates a sprite with a texture and a rect. More... | |
static Sprite * | createWithSpriteFrame (SpriteFrame *spriteFrame) |
Creates a sprite with an sprite frame. More... | |
var | createWithSpriteFrame ( var spriteFrame) |
Creates a sprite with an sprite frame. More... | |
local | createWithSpriteFrame ( local spriteFrame) |
Creates a sprite with an sprite frame. More... | |
static Sprite * | createWithSpriteFrameName (const std::string &spriteFrameName) |
Creates a sprite with an sprite frame name. More... | |
var | createWithSpriteFrameName ( var spriteFrameName) |
Creates a sprite with an sprite frame name. More... | |
local | createWithSpriteFrameName ( local spriteFrameName) |
Creates a sprite with an sprite frame name. More... | |
BatchNode methods | |
virtual void | updateTransform (void) |
Updates the quad according the rotation, position, scale values. More... | |
virtual SpriteBatchNode * | getBatchNode (void) |
Returns the batch node object if this sprite is rendered by SpriteBatchNode. More... | |
virtual void | setBatchNode (SpriteBatchNode *spriteBatchNode) |
Sets the batch node to sprite. More... | |
local | setBatchNode ( local spriteBatchNode) |
Sets the batch node to sprite. More... | |
Texture / Frame methods | |
virtual void | setTexture (const std::string &filename) |
Sets a new texture (from a filename) to the sprite. More... | |
virtual void | setTexture (Texture2D *texture) override |
Sets a new texture to the sprite. More... | |
virtual Texture2D * | getTexture () const override |
returns the Texture2D object used by the sprite More... | |
var | getTexture () |
returns the Texture2D object used by the sprite More... | |
local | getTexture () |
returns the Texture2D object used by the sprite More... | |
virtual void | setTextureRect (const Rect &rect) |
Updates the texture rect of the Sprite in points. More... | |
local | setTextureRect ( local rect) |
Updates the texture rect of the Sprite in points. More... | |
virtual void | setTextureRect (const Rect &rect, bool rotated, const Size &untrimmedSize) |
Sets the texture rect, rectRotated and untrimmed size of the Sprite in points. More... | |
local | setTextureRect ( local rect, local rotated, local untrimmedSize) |
Sets the texture rect, rectRotated and untrimmed size of the Sprite in points. More... | |
virtual void | setVertexRect (const Rect &rect) |
Sets the vertex rect. More... | |
virtual void | setSpriteFrame (const std::string &spriteFrameName) |
Sets a new SpriteFrame to the Sprite. More... | |
var | setSpriteFrame ( var spriteFrameName) |
Sets a new SpriteFrame to the Sprite. More... | |
local | setSpriteFrame ( local spriteFrameName) |
Sets a new SpriteFrame to the Sprite. More... | |
virtual void | setSpriteFrame (SpriteFrame *newFrame) |
var | setSpriteFrame ( var newFrame) |
local | setSpriteFrame ( local newFrame) |
virtual void | setDisplayFrame (SpriteFrame *newFrame) |
virtual bool | isFrameDisplayed (SpriteFrame *pFrame) const |
Returns whether or not a SpriteFrame is being displayed. More... | |
virtual SpriteFrame * | getSpriteFrame () const |
Returns the current displayed frame. More... | |
local | getSpriteFrame () |
Returns the current displayed frame. More... | |
virtual SpriteFrame * | getDisplayFrame () const |
var | getDisplayFrame () |
local | getDisplayFrame () |
virtual SpriteFrame * | displayFrame () const |
var | displayFrame () |
local | displayFrame () |
Animation methods | |
virtual void | setDisplayFrameWithAnimationName (const std::string &animationName, ssize_t frameIndex) |
Changes the display frame with animation name and index. More... | |
Sprite Properties' setter/getters | |
virtual bool | isDirty (void) const |
Whether or not the Sprite needs to be updated in the Atlas. More... | |
virtual void | setDirty (bool dirty) |
Makes the Sprite to be updated in the Atlas. More... | |
V3F_C4B_T2F_Quad | getQuad (void) const |
Returns the quad (tex coords, vertex coords and color) information. More... | |
bool | isTextureRectRotated (void) const |
Returns whether or not the texture rectangle is rotated. More... | |
ssize_t | getAtlasIndex (void) const |
Returns the index used on the TextureAtlas. More... | |
var | getAtlasIndex () |
Returns the index used on the TextureAtlas. More... | |
local | getAtlasIndex () |
Returns the index used on the TextureAtlas. More... | |
void | setAtlasIndex (ssize_t atlasIndex) |
Sets the index used on the TextureAtlas. More... | |
const Rect & | getTextureRect (void) |
Returns the rect of the Sprite in points. More... | |
var | getTextureRect () |
Returns the rect of the Sprite in points. More... | |
local | getTextureRect () |
Returns the rect of the Sprite in points. More... | |
TextureAtlas * | getTextureAtlas (void) |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
var | getTextureAtlas () |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
local | getTextureAtlas () |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
void | setTextureAtlas (TextureAtlas *pobTextureAtlas) |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
var | setTextureAtlas ( var pobTextureAtlas) |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
local | setTextureAtlas ( local pobTextureAtlas) |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. More... | |
const Vec2 & | getOffsetPosition (void) const |
Gets the offset position of the sprite. More... | |
local | getOffsetPosition () |
Gets the offset position of the sprite. More... | |
bool | isFlippedX (void) const |
Returns the flag which indicates whether the sprite is flipped horizontally or not. More... | |
void | setFlippedX (bool flippedX) |
Sets whether the sprite should be flipped horizontally or not. More... | |
bool | isFlipX () |
void | setFlipX (bool flippedX) |
var | setFlipX ( var flippedX) |
local | setFlipX ( local flippedX) |
bool | isFlippedY (void) const |
Return the flag which indicates whether the sprite is flipped vertically or not. More... | |
void | setFlippedY (bool flippedY) |
Sets whether the sprite should be flipped vertically or not. More... | |
Functions inherited from TextureProtocol | |
void | setBlendFunc (const BlendFunc &blendFunc) override |
var | setBlendFunc ( var blendFunc) |
local | setBlendFunc ( local blendFunc) |
const BlendFunc & | getBlendFunc () const override |
Returns the blending function that is currently being used. More... | |
Functions inherited from Node | |
virtual void | setScaleX (float scaleX) override |
Sets the scale (x) of the node. More... | |
virtual void | setScaleY (float scaleY) override |
Sets the scale (y) of the node. More... | |
var | setScaleY ( var scaleY) |
Sets the scale (y) of the node. More... | |
local | setScaleY ( local scaleY) |
Sets the scale (y) of the node. More... | |
virtual void | setScale (float scaleX, float scaleY) override |
Sets the scale (x,y) of the node. More... | |
var | setScale ( var scaleX, var scaleY) |
Sets the scale (x,y) of the node. More... | |
local | setScale ( local scaleX, local scaleY) |
Sets the scale (x,y) of the node. More... | |
virtual void | setPosition (const Vec2 &pos) override |
Sets the position (x,y) of the node in its parent's coordinate system. More... | |
virtual void | setPosition (float x, float y) override |
Sets the position (x,y) of the node in its parent's coordinate system. More... | |
var | setPosition ( var x, var y) |
Sets the position (x,y) of the node in its parent's coordinate system. More... | |
local | setPosition ( local x, local y) |
Sets the position (x,y) of the node in its parent's coordinate system. More... | |
virtual void | setRotation (float rotation) override |
Sets the rotation (angle) of the node in degrees. More... | |
var | setRotation ( var rotation) |
Sets the rotation (angle) of the node in degrees. More... | |
local | setRotation ( local rotation) |
Sets the rotation (angle) of the node in degrees. More... | |
virtual void | setRotationSkewX (float rotationX) override |
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. More... | |
virtual void | setRotationSkewY (float rotationY) override |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More... | |
var | setRotationSkewY ( var rotationY) |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More... | |
local | setRotationSkewY ( local rotationY) |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More... | |
virtual void | setSkewX (float sx) override |
Changes the X skew angle of the node in degrees. More... | |
var | setSkewX ( var sx) |
Changes the X skew angle of the node in degrees. More... | |
local | setSkewX ( local sx) |
Changes the X skew angle of the node in degrees. More... | |
virtual void | setSkewY (float sy) override |
Changes the Y skew angle of the node in degrees. More... | |
var | setSkewY ( var sy) |
Changes the Y skew angle of the node in degrees. More... | |
local | setSkewY ( local sy) |
Changes the Y skew angle of the node in degrees. More... | |
virtual void | removeChild (Node *child, bool cleanup) override |
Removes a child from the container. More... | |
var | removeChild ( var child, var cleanup) |
Removes a child from the container. More... | |
local | removeChild ( local child, local cleanup) |
Removes a child from the container. More... | |
virtual void | removeAllChildrenWithCleanup (bool cleanup) override |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. More... | |
virtual void | reorderChild (Node *child, int zOrder) override |
Reorders a child according to a new z value. More... | |
var | reorderChild ( var child, var zOrder) |
Reorders a child according to a new z value. More... | |
local | reorderChild ( local child, local zOrder) |
Reorders a child according to a new z value. More... | |
virtual void | addChild (Node *child, int zOrder, int tag) override |
Adds a child to the container with z order and tag. More... | |
local | addChild ( local child, local zOrder, local tag) |
Adds a child to the container with z order and tag. More... | |
virtual void | addChild (Node *child, int zOrder, const std::string &name) override |
Adds a child to the container with z order and tag. More... | |
var | addChild ( var child, var zOrder, var name) |
Adds a child to the container with z order and tag. More... | |
local | addChild ( local child, local zOrder, local name) |
Adds a child to the container with z order and tag. More... | |
virtual void | sortAllChildren () override |
Sorts the children array once before drawing, instead of every time when a child is added or reordered. More... | |
var | sortAllChildren () |
Sorts the children array once before drawing, instead of every time when a child is added or reordered. More... | |
local | sortAllChildren () |
Sorts the children array once before drawing, instead of every time when a child is added or reordered. More... | |
virtual void | setScale (float scale) override |
Sets the scale (x,y,z) of the node. More... | |
local | setScale ( local scale) |
Sets the scale (x,y,z) of the node. More... | |
virtual void | setPositionZ (float positionZ) override |
Sets the 'z' coordinate in the position. More... | |
var | setPositionZ ( var positionZ) |
Sets the 'z' coordinate in the position. More... | |
local | setPositionZ ( local positionZ) |
Sets the 'z' coordinate in the position. More... | |
virtual void | setAnchorPoint (const Vec2 &anchor) override |
Sets the anchor point in percent. More... | |
var | setAnchorPoint ( var anchor) |
Sets the anchor point in percent. More... | |
local | setAnchorPoint ( local anchor) |
Sets the anchor point in percent. More... | |
virtual void | ignoreAnchorPointForPosition (bool value) override |
Sets whether the anchor point will be (0,0) when you position this node. More... | |
local | ignoreAnchorPointForPosition ( local value) |
Sets whether the anchor point will be (0,0) when you position this node. More... | |
virtual void | setVisible (bool bVisible) override |
Sets whether the node is visible. More... | |
var | setVisible ( var bVisible) |
Sets whether the node is visible. More... | |
local | setVisible ( local bVisible) |
Sets whether the node is visible. More... | |
virtual void | draw (Renderer *renderer, const Mat4 &transform, uint32_t flags) override |
Override this method to draw your own node. More... | |
virtual void | setOpacityModifyRGB (bool modify) override |
virtual bool | isOpacityModifyRGB (void) const override |
var | isOpacityModifyRGB () |
local | isOpacityModifyRGB () |
|
virtual |
|
virtual |
|
virtual |
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
tag | An integer to identify the node easily. Please refer to setTag(int) |
Please use addChild(Node* child, int localZOrder, const std::string &name)
instead.
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
tag | An integer to identify the node easily. Please refer to setTag(int) |
Please use addChild(Node* child, int localZOrder, const std::string &name)
instead.
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
tag | An integer to identify the node easily. Please refer to setTag(int) |
Please use addChild(Node* child, int localZOrder, const std::string &name)
instead.
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
name | A string to identify the node easily. Please refer to setName(int) |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
name | A string to identify the node easily. Please refer to setName(int) |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z order and tag.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
zOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
name | A string to identify the node easily. Please refer to setName(int) |
Reimplemented from Node.
|
static |
Creates an empty sprite without texture.
You can call setTexture method subsequently.
|
static |
Creates an empty sprite without texture.
You can call setTexture method subsequently.
|
static |
Creates an empty sprite without texture.
You can call setTexture method subsequently.
|
static |
Creates a sprite with an image filename.
After creation, the rect of sprite will be the size of the image, and the offset will be (0,0).
filename | A path to image file, e.g., "scene1/monster.png" |
|
static |
Creates a sprite with an image filename.
After creation, the rect of sprite will be the size of the image, and the offset will be (0,0).
filename | A path to image file, e.g., "scene1/monster.png" |
|
static |
Creates a sprite with an image filename.
After creation, the rect of sprite will be the size of the image, and the offset will be (0,0).
filename | A path to image file, e.g., "scene1/monster.png" |
|
static |
Creates a sprite with an image filename and a rect.
filename | A path to image file, e.g., "scene1/monster.png" |
rect | A subrect of the image file |
|
static |
Creates a sprite with an image filename and a rect.
filename | A path to image file, e.g., "scene1/monster.png" |
rect | A subrect of the image file |
|
static |
Creates a sprite with an image filename and a rect.
filename | A path to image file, e.g., "scene1/monster.png" |
rect | A subrect of the image file |
|
static |
Creates a sprite with an sprite frame.
spriteFrame | A sprite frame which involves a texture and a rect |
|
static |
Creates a sprite with an sprite frame.
spriteFrame | A sprite frame which involves a texture and a rect |
|
static |
Creates a sprite with an sprite frame.
spriteFrame | A sprite frame which involves a texture and a rect |
|
static |
Creates a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A null terminated string which indicates the sprite frame name. |
|
static |
Creates a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A null terminated string which indicates the sprite frame name. |
|
static |
Creates a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A null terminated string which indicates the sprite frame name. |
|
static |
|
static |
|
static |
|
static |
Creates a sprite with a texture and a rect.
After creation, the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside the rect of this texture will be applied for this sprite. |
rotated | Whether or not the rect is rotated |
|
static |
Creates a sprite with a texture and a rect.
After creation, the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside the rect of this texture will be applied for this sprite. |
rotated | Whether or not the rect is rotated |
|
static |
Creates a sprite with a texture and a rect.
After creation, the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside the rect of this texture will be applied for this sprite. |
rotated | Whether or not the rect is rotated |
|
inlinevirtual |
getSpriteFrame()
instead
|
inlinevirtual |
getSpriteFrame()
instead
|
inlinevirtual |
getSpriteFrame()
instead Override this method to draw your own node.
The following GL states will be enabled by default:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnable(GL_TEXTURE_2D);
AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node. Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnable(GL_TEXTURE_2D);
AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node. Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnable(GL_TEXTURE_2D);
AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node. Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
inline |
Returns the index used on the TextureAtlas.
|
inline |
Returns the index used on the TextureAtlas.
|
inline |
Returns the index used on the TextureAtlas.
|
virtual |
Returns the batch node object if this sprite is rendered by SpriteBatchNode.
|
virtual |
Returns the batch node object if this sprite is rendered by SpriteBatchNode.
|
virtual |
Returns the batch node object if this sprite is rendered by SpriteBatchNode.
|
inlineoverridevirtual |
Returns the blending function that is currently being used.
Implements BlendProtocol.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inlinevirtual |
getSpriteFrame()
instead
|
inlinevirtual |
getSpriteFrame()
instead
|
inlinevirtual |
getSpriteFrame()
instead
|
inline |
Gets the offset position of the sprite.
Calculated automatically by editors like Zwoptex.
|
inline |
Gets the offset position of the sprite.
Calculated automatically by editors like Zwoptex.
|
inline |
Gets the offset position of the sprite.
Calculated automatically by editors like Zwoptex.
|
inline |
Returns the quad (tex coords, vertex coords and color) information.
|
virtual |
Returns the current displayed frame.
|
virtual |
Returns the current displayed frame.
|
virtual |
Returns the current displayed frame.
|
overridevirtual |
returns the Texture2D object used by the sprite
Implements TextureProtocol.
|
overridevirtual |
returns the Texture2D object used by the sprite
Implements TextureProtocol.
|
overridevirtual |
returns the Texture2D object used by the sprite
Implements TextureProtocol.
|
inline |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
inline |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
inline |
Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
inline |
Returns the rect of the Sprite in points.
|
inline |
Returns the rect of the Sprite in points.
|
inline |
Returns the rect of the Sprite in points.
|
overridevirtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by Layer and Scene. Don't call it outside framework. The default value is false, while in Layer and Scene are true
ignore | true if anchor point will be (0,0) when you position this node |
Reimplemented from Node.
|
overridevirtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by Layer and Scene. Don't call it outside framework. The default value is false, while in Layer and Scene are true
ignore | true if anchor point will be (0,0) when you position this node |
Reimplemented from Node.
|
overridevirtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by Layer and Scene. Don't call it outside framework. The default value is false, while in Layer and Scene are true
ignore | true if anchor point will be (0,0) when you position this node |
Reimplemented from Node.
|
virtual |
Reimplemented from Node.
|
virtual |
Reimplemented from Node.
|
virtual |
Reimplemented from Node.
|
virtual |
Initializes a sprite with an image filename.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the rect used will be the size of the image. The offset will be (0,0).
filename | The path to an image file in local file system |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with an image filename.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the rect used will be the size of the image. The offset will be (0,0).
filename | The path to an image file in local file system |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with an image filename.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the rect used will be the size of the image. The offset will be (0,0).
filename | The path to an image file in local file system |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with an image filename, and a rect.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the offset will be (0,0).
filename | The path to an image file in local file system. |
rect | The rectangle assigned the content area from texture. |
|
virtual |
Initializes a sprite with an image filename, and a rect.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the offset will be (0,0).
filename | The path to an image file in local file system. |
rect | The rectangle assigned the content area from texture. |
|
virtual |
Initializes a sprite with an image filename, and a rect.
This method will find filename from local file system, load its content to Texture2D, then use Texture2D to create a sprite. After initialization, the offset will be (0,0).
filename | The path to an image file in local file system. |
rect | The rectangle assigned the content area from texture. |
|
virtual |
Initializes a sprite with an SpriteFrame.
The texture and rect in SpriteFrame will be applied on this sprite
pSpriteFrame | A SpriteFrame object. It should includes a valid texture and a rect |
|
virtual |
Initializes a sprite with an SpriteFrame.
The texture and rect in SpriteFrame will be applied on this sprite
pSpriteFrame | A SpriteFrame object. It should includes a valid texture and a rect |
|
virtual |
Initializes a sprite with an SpriteFrame.
The texture and rect in SpriteFrame will be applied on this sprite
pSpriteFrame | A SpriteFrame object. It should includes a valid texture and a rect |
|
virtual |
Initializes a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by name. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A key string that can fected a volid SpriteFrame from SpriteFrameCache |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by name. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A key string that can fected a volid SpriteFrame from SpriteFrameCache |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with an sprite frame name.
A SpriteFrame will be fetched from the SpriteFrameCache by name. If the SpriteFrame doesn't exist it will raise an exception.
spriteFrameName | A key string that can fected a volid SpriteFrame from SpriteFrameCache |
Reimplemented in Skin.
|
virtual |
Initializes a sprite with a texture.
After initialization, the rect used will be the size of the texture, and the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
|
virtual |
Initializes a sprite with a texture.
After initialization, the rect used will be the size of the texture, and the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
|
virtual |
Initializes a sprite with a texture.
After initialization, the rect used will be the size of the texture, and the offset will be (0,0).
texture | A pointer to an existing Texture2D object. You can use a Texture2D object for many sprites. |
Initializes a sprite with a texture and a rect.
After initialization, the offset will be (0,0).
texture | A pointer to an exisiting Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside rect of this texture will be applied for this sprite. |
|
virtual |
Initializes a sprite with a texture and a rect.
After initialization, the offset will be (0,0).
texture | A pointer to an exisiting Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside rect of this texture will be applied for this sprite. |
|
virtual |
Initializes a sprite with a texture and a rect.
After initialization, the offset will be (0,0).
texture | A pointer to an exisiting Texture2D object. You can use a Texture2D object for many sprites. |
rect | Only the contents inside rect of this texture will be applied for this sprite. |
Initializes a sprite with a texture and a rect in points, optionally rotated.
After initialization, the offset will be (0,0).
texture | A Texture2D object whose texture will be applied to this sprite. |
rect | A rectangle assigned the contents of texture. |
rotated | Whether or not the texture rectangle is rotated. |
|
virtual |
Initializes a sprite with a texture and a rect in points, optionally rotated.
After initialization, the offset will be (0,0).
texture | A Texture2D object whose texture will be applied to this sprite. |
rect | A rectangle assigned the contents of texture. |
rotated | Whether or not the texture rectangle is rotated. |
|
virtual |
Initializes a sprite with a texture and a rect in points, optionally rotated.
After initialization, the offset will be (0,0).
texture | A Texture2D object whose texture will be applied to this sprite. |
rect | A rectangle assigned the contents of texture. |
rotated | Whether or not the texture rectangle is rotated. |
|
inlinevirtual |
Whether or not the Sprite needs to be updated in the Atlas.
Reimplemented in PhysicsSprite.
|
inlinevirtual |
Whether or not the Sprite needs to be updated in the Atlas.
Reimplemented in PhysicsSprite.
|
inlinevirtual |
Whether or not the Sprite needs to be updated in the Atlas.
Reimplemented in PhysicsSprite.
bool isFlippedX | ( | void | ) | const |
Returns the flag which indicates whether the sprite is flipped horizontally or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleX(sprite->getScaleX() * -1);
var isFlippedX | ( | ) |
Returns the flag which indicates whether the sprite is flipped horizontally or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleX(sprite->getScaleX() * -1);
local isFlippedX | ( | ) |
Returns the flag which indicates whether the sprite is flipped horizontally or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleX(sprite->getScaleX() * -1);
bool isFlippedY | ( | void | ) | const |
Return the flag which indicates whether the sprite is flipped vertically or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleY(sprite->getScaleY() * -1);
var isFlippedY | ( | ) |
Return the flag which indicates whether the sprite is flipped vertically or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleY(sprite->getScaleY() * -1);
local isFlippedY | ( | ) |
Return the flag which indicates whether the sprite is flipped vertically or not.
It only flips the texture of the sprite, and not the texture of the sprite's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: sprite->setScaleY(sprite->getScaleY() * -1);
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Returns whether or not a SpriteFrame is being displayed.
|
virtual |
Returns whether or not a SpriteFrame is being displayed.
|
virtual |
Returns whether or not a SpriteFrame is being displayed.
|
overridevirtual |
Reimplemented from Node.
|
overridevirtual |
Reimplemented from Node.
|
overridevirtual |
Reimplemented from Node.
|
inline |
Returns whether or not the texture rectangle is rotated.
|
inline |
Returns whether or not the texture rectangle is rotated.
|
inline |
Returns whether or not the texture rectangle is rotated.
|
overridevirtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
cleanup | true if all running actions on all children nodes should be cleanup, false oterwise. |
Reimplemented from Node.
|
overridevirtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
cleanup | true if all running actions on all children nodes should be cleanup, false oterwise. |
Reimplemented from Node.
|
overridevirtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
cleanup | true if all running actions on all children nodes should be cleanup, false oterwise. |
Reimplemented from Node.
|
overridevirtual |
Removes a child from the container.
It will also cleanup all running actions depending on the cleanup parameter.
child | The child node which will be removed. |
cleanup | true if all running actions and callbacks on the child node will be cleanup, false otherwise. |
Reimplemented from Node.
|
overridevirtual |
Removes a child from the container.
It will also cleanup all running actions depending on the cleanup parameter.
child | The child node which will be removed. |
cleanup | true if all running actions and callbacks on the child node will be cleanup, false otherwise. |
Reimplemented from Node.
|
overridevirtual |
Removes a child from the container.
It will also cleanup all running actions depending on the cleanup parameter.
child | The child node which will be removed. |
cleanup | true if all running actions and callbacks on the child node will be cleanup, false otherwise. |
Reimplemented from Node.
|
overridevirtual |
Reorders a child according to a new z value.
child | An already added child node. It MUST be already added. |
localZOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
Reimplemented from Node.
|
overridevirtual |
Reorders a child according to a new z value.
child | An already added child node. It MUST be already added. |
localZOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
Reimplemented from Node.
|
overridevirtual |
Reorders a child according to a new z value.
child | An already added child node. It MUST be already added. |
localZOrder | Z order for drawing priority. Please refer to setLocalZOrder(int) |
Reimplemented from Node.
|
overridevirtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
anchorPoint | The anchor point of node. |
Reimplemented from Node.
|
overridevirtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
anchorPoint | The anchor point of node. |
Reimplemented from Node.
|
overridevirtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
anchorPoint | The anchor point of node. |
Reimplemented from Node.
|
inline |
Sets the index used on the TextureAtlas.
|
inline |
Sets the index used on the TextureAtlas.
|
inline |
Sets the index used on the TextureAtlas.
|
virtual |
Sets the batch node to sprite.
|
virtual |
Sets the batch node to sprite.
|
virtual |
Sets the batch node to sprite.
|
inlineoverridevirtual |
Implements BlendProtocol.
|
inlineoverridevirtual |
Implements BlendProtocol.
|
inlineoverridevirtual |
Implements BlendProtocol.
|
inlinevirtual |
Makes the Sprite to be updated in the Atlas.
|
inlinevirtual |
Makes the Sprite to be updated in the Atlas.
|
inlinevirtual |
Makes the Sprite to be updated in the Atlas.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
inlinevirtual |
setSpriteFrame()
instead.
|
inlinevirtual |
setSpriteFrame()
instead.
|
inlinevirtual |
setSpriteFrame()
instead.
|
virtual |
Changes the display frame with animation name and index.
The animation name will be get from the AnimationCache
|
virtual |
Changes the display frame with animation name and index.
The animation name will be get from the AnimationCache
|
virtual |
Changes the display frame with animation name and index.
The animation name will be get from the AnimationCache
void setFlippedX | ( | bool | flippedX | ) |
Sets whether the sprite should be flipped horizontally or not.
flippedX | true if the sprite should be flipped horizontally, false otherwise. |
var setFlippedX | ( | var | flippedX | ) |
Sets whether the sprite should be flipped horizontally or not.
flippedX | true if the sprite should be flipped horizontally, false otherwise. |
local setFlippedX | ( | local | flippedX | ) |
Sets whether the sprite should be flipped horizontally or not.
flippedX | true if the sprite should be flipped horizontally, false otherwise. |
void setFlippedY | ( | bool | flippedY | ) |
Sets whether the sprite should be flipped vertically or not.
flippedY | true if the sprite should be flipped vertically, false otherwise. |
var setFlippedY | ( | var | flippedY | ) |
Sets whether the sprite should be flipped vertically or not.
flippedY | true if the sprite should be flipped vertically, false otherwise. |
local setFlippedY | ( | local | flippedY | ) |
Sets whether the sprite should be flipped vertically or not.
flippedY | true if the sprite should be flipped vertically, false otherwise. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from Node.
|
overridevirtual |
Reimplemented from Node.
|
overridevirtual |
Reimplemented from Node.
|
overridevirtual |
Sets the position (x,y) of the node in its parent's coordinate system.
Usually we use Vec2(x,y)
to compose Vec2 object. This code snippet sets the node in the center of screen.
position | The position (x,y) of the node in OpenGL coordinates |
Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Sets the position (x,y) of the node in its parent's coordinate system.
Passing two numbers (x,y) is much efficient than passing Vec2 object. This method is bound to Lua and JavaScript. Passing a number is 10 times faster than passing a object from Lua to c++
x | X coordinate for position |
y | Y coordinate for position |
Reimplemented from Node.
|
overridevirtual |
Sets the position (x,y) of the node in its parent's coordinate system.
Passing two numbers (x,y) is much efficient than passing Vec2 object. This method is bound to Lua and JavaScript. Passing a number is 10 times faster than passing a object from Lua to c++
x | X coordinate for position |
y | Y coordinate for position |
Reimplemented from Node.
|
overridevirtual |
Sets the position (x,y) of the node in its parent's coordinate system.
Passing two numbers (x,y) is much efficient than passing Vec2 object. This method is bound to Lua and JavaScript. Passing a number is 10 times faster than passing a object from Lua to c++
x | X coordinate for position |
y | Y coordinate for position |
Reimplemented from Node.
|
overridevirtual |
Sets the 'z' coordinate in the position.
It is the OpenGL Z vertex value.
The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on in order to use this property correctly.
setPositionZ()
also sets the setGlobalZValue()
with the positionZ as value.
setGlobalZValue()
vertexZ | OpenGL Z vertex of this node. |
Reimplemented from Node.
|
overridevirtual |
Sets the 'z' coordinate in the position.
It is the OpenGL Z vertex value.
The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on in order to use this property correctly.
setPositionZ()
also sets the setGlobalZValue()
with the positionZ as value.
setGlobalZValue()
vertexZ | OpenGL Z vertex of this node. |
Reimplemented from Node.
|
overridevirtual |
Sets the 'z' coordinate in the position.
It is the OpenGL Z vertex value.
The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on in order to use this property correctly.
setPositionZ()
also sets the setGlobalZValue()
with the positionZ as value.
setGlobalZValue()
vertexZ | OpenGL Z vertex of this node. |
Reimplemented from Node.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
overridevirtual |
Sets the rotation (angle) of the node in degrees.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotation | The rotation of the node in degrees. |
Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Sets the rotation (angle) of the node in degrees.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotation | The rotation of the node in degrees. |
Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Sets the rotation (angle) of the node in degrees.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotation | The rotation of the node in degrees. |
Reimplemented from Node.
Reimplemented in PhysicsSprite.
|
overridevirtual |
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationX | The X rotation in degrees which performs a horizontal rotational skew. |
Reimplemented from Node.
|
overridevirtual |
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationX | The X rotation in degrees which performs a horizontal rotational skew. |
Reimplemented from Node.
|
overridevirtual |
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationX | The X rotation in degrees which performs a horizontal rotational skew. |
Reimplemented from Node.
|
overridevirtual |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationY | The Y rotation in degrees. |
Reimplemented from Node.
|
overridevirtual |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationY | The Y rotation in degrees. |
Reimplemented from Node.
|
overridevirtual |
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
0 is the default rotation angle. Positive values rotate node clockwise, and negative values for anti-clockwise.
rotationY | The Y rotation in degrees. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y) of the node.
It is a scaling factor that multiplies the width and height of the node and its children.
scaleX | The scale factor on X axis. |
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y) of the node.
It is a scaling factor that multiplies the width and height of the node and its children.
scaleX | The scale factor on X axis. |
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y) of the node.
It is a scaling factor that multiplies the width and height of the node and its children.
scaleX | The scale factor on X axis. |
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y,z) of the node.
It is a scaling factor that multiplies the width, height and depth of the node and its children.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y,z) of the node.
It is a scaling factor that multiplies the width, height and depth of the node and its children.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x,y,z) of the node.
It is a scaling factor that multiplies the width, height and depth of the node and its children.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x) of the node.
It is a scaling factor that multiplies the width of the node and its children.
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x) of the node.
It is a scaling factor that multiplies the width of the node and its children.
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (x) of the node.
It is a scaling factor that multiplies the width of the node and its children.
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (y) of the node.
It is a scaling factor that multiplies the height of the node and its children.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (y) of the node.
It is a scaling factor that multiplies the height of the node and its children.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Sets the scale (y) of the node.
It is a scaling factor that multiplies the height of the node and its children.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y coordinate and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
skewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y coordinate and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
skewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y coordinate and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
skewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X coordinate and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
skewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X coordinate and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
skewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
The difference between setRotationalSkew()
and setSkew()
is that the first one simulate Flash's skew functionality while the second one uses the real skew function.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X coordinate and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
skewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
virtual |
Sets a new SpriteFrame to the Sprite.
|
virtual |
Sets a new SpriteFrame to the Sprite.
|
virtual |
Sets a new SpriteFrame to the Sprite.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets a new texture (from a filename) to the sprite.
It will call setTextureRect()
with the texture's content size. TODO: The whole Sprite API needs to be reviewed.
|
virtual |
Sets a new texture (from a filename) to the sprite.
It will call setTextureRect()
with the texture's content size. TODO: The whole Sprite API needs to be reviewed.
|
virtual |
Sets a new texture (from a filename) to the sprite.
It will call setTextureRect()
with the texture's content size. TODO: The whole Sprite API needs to be reviewed.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inline |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
inline |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
inline |
Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Updates the texture rect of the Sprite in points.
It will call setTextureRect(const Rect& rect, bool rotated, const Size& untrimmedSize) with rotated
= false, and utrimmedSize
= rect.size.
|
virtual |
Updates the texture rect of the Sprite in points.
It will call setTextureRect(const Rect& rect, bool rotated, const Size& untrimmedSize) with rotated
= false, and utrimmedSize
= rect.size.
|
virtual |
Updates the texture rect of the Sprite in points.
It will call setTextureRect(const Rect& rect, bool rotated, const Size& untrimmedSize) with rotated
= false, and utrimmedSize
= rect.size.
Sets the texture rect, rectRotated and untrimmed size of the Sprite in points.
It will update the texture coordinates and the vertex rectangle.
|
virtual |
Sets the texture rect, rectRotated and untrimmed size of the Sprite in points.
It will update the texture coordinates and the vertex rectangle.
|
virtual |
Sets the texture rect, rectRotated and untrimmed size of the Sprite in points.
It will update the texture coordinates and the vertex rectangle.
|
virtual |
Sets the vertex rect.
It will be called internally by setTextureRect. Useful if you want to create 2x images from SD images in Retina Display. Do not call it manually. Use setTextureRect instead.
|
virtual |
Sets the vertex rect.
It will be called internally by setTextureRect. Useful if you want to create 2x images from SD images in Retina Display. Do not call it manually. Use setTextureRect instead.
|
virtual |
Sets the vertex rect.
It will be called internally by setTextureRect. Useful if you want to create 2x images from SD images in Retina Display. Do not call it manually. Use setTextureRect instead.
|
overridevirtual |
Sets whether the node is visible.
The default value is true, a node is default to visible
visible | true if the node is visible, false if the node is hidden. |
Reimplemented from Node.
|
overridevirtual |
Sets whether the node is visible.
The default value is true, a node is default to visible
visible | true if the node is visible, false if the node is hidden. |
Reimplemented from Node.
|
overridevirtual |
Sets whether the node is visible.
The default value is true, a node is default to visible
visible | true if the node is visible, false if the node is hidden. |
Reimplemented from Node.
|
overridevirtual |
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
This appraoch can improves the performance massively.
Reimplemented from Node.
|
overridevirtual |
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
This appraoch can improves the performance massively.
Reimplemented from Node.
|
overridevirtual |
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
This appraoch can improves the performance massively.
Reimplemented from Node.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented from Node.
|
protectedvirtual |
Reimplemented from Node.
|
protectedvirtual |
Reimplemented from Node.
|
virtual |
|
virtual |
|
virtual |
CC_CONSTRUCTOR_ACCESS __pad0__ |
var __pad0__ |
local __pad0__ |
|
protected |
SpriteBatchNode texture atlas (weak reference)
|
protected |
SpriteBatchNode texture atlas (weak reference)
|
protected |
SpriteBatchNode texture atlas (weak reference)
|
protected |
Absolute (real) Index on the SpriteSheet.
|
protected |
Absolute (real) Index on the SpriteSheet.
|
protected |
Absolute (real) Index on the SpriteSheet.
|
protected |
|
protected |
|
protected |
|
protected |
Used batch node (weak reference)
|
protected |
Used batch node (weak reference)
|
protected |
Used batch node (weak reference)
|
protected |
|
protected |
|
protected |
|
protected |
Whether the sprite is flipped horizontally or not.
|
protected |
Whether the sprite is flipped horizontally or not.
|
protected |
Whether the sprite is flipped horizontally or not.
|
protected |
Whether the sprite is flipped vertically or not.
|
protected |
Whether the sprite is flipped vertically or not.
|
protected |
Whether the sprite is flipped vertically or not.
|
protected |
Whether the texture is rotated.
|
protected |
Whether the texture is rotated.
|
protected |
Whether the texture is rotated.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Texture2D object that is used to render the sprite.
|
protected |
Texture2D object that is used to render the sprite.
|
protected |
Texture2D object that is used to render the sprite.
|
protected |
quad command
|
protected |
quad command
|
protected |
quad command
|
protected |
Retangle of Texture2D.
|
protected |
Retangle of Texture2D.
|
protected |
Retangle of Texture2D.
|
protected |
Whether the sprite needs to be updated.
|
protected |
Whether the sprite needs to be updated.
|
protected |
Whether the sprite needs to be updated.
|
protected |
Whether all of the sprite's children needs to be updated.
|
protected |
Whether all of the sprite's children needs to be updated.
|
protected |
Whether all of the sprite's children needs to be updated.
|
protected |
It's required for TextureProtocol inheritance.
|
protected |
It's required for TextureProtocol inheritance.
|
protected |
It's required for TextureProtocol inheritance.
|
protected |
|
protected |
should not be drawn because one of the ancestors is not visible
|
protected |
should not be drawn because one of the ancestors is not visible
|
protected |
should not be drawn because one of the ancestors is not visible
|
protected |
|
protected |
|
protected |