Classes | |
class | AnimationFrame |
AnimationFrame A frame of the animation. More... | |
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 | |
CC_DEPRECATED_ATTRIBUTE bool | isFlipY () |
local | isFlipY () |
CC_DEPRECATED_ATTRIBUTE void | setFlipY (bool flippedY) |
local | setFlipY ( local flippedY) |
void | updateColor (void) |
virtual void | setTextureCoords (Rect rect) |
local | setTextureCoords ( local rect) |
virtual void | updateBlendFunc (void) |
virtual void | setReorderChildDirtyRecursively (void) |
local | setReorderChildDirtyRecursively () |
virtual void | setDirtyRecursively (bool bValue) |
Variables | |
TextureAtlas * | _textureAtlas |
int | _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... | |
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 | _hasChildren |
Whether all of the sprite's children needs to be updated. More... | |
bool | _shouldBeHidden |
Whether the sprite contains children. More... | |
var | _shouldBeHidden |
Whether the sprite contains children. More... | |
local | _shouldBeHidden |
Whether the sprite contains children. More... | |
AffineTransform | _transformToBatch |
should not be drawn because one of the ancestors is not visible More... | |
var | _transformToBatch |
should not be drawn because one of the ancestors is not visible More... | |
local | _transformToBatch |
should not be drawn because one of the ancestors is not visible More... | |
BlendFunc | _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... | |
Rect | _rect |
Texture2D object that is used to render the sprite. More... | |
bool | _rectRotated |
Retangle of Texture2D. More... | |
Point | _offsetPosition |
Whether the texture is rotated. More... | |
var | _offsetPosition |
Whether the texture is rotated. More... | |
local | _offsetPosition |
Whether the texture is rotated. More... | |
Point | _unflippedOffsetPositionFromCenter |
var | _unflippedOffsetPositionFromCenter |
local | _unflippedOffsetPositionFromCenter |
V3F_C4B_T2F_Quad | _quad |
bool | _opacityModifyRGB |
var | _opacityModifyRGB |
local | _opacityModifyRGB |
bool | _flippedX |
bool | _flippedY |
Whether the sprite is flipped horizaontally or not. More... | |
var | _flippedY |
Whether the sprite is flipped horizaontally or not. More... | |
local | _flippedY |
Whether the sprite is flipped horizaontally or not. More... | |
Creators | |
Sprite invalid index on the SpriteBatchNode | |
static Sprite * | create () |
Creates an empty sprite without texture. More... | |
static Sprite * | create (const char *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 char *filename, const Rect &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 an exsiting texture contained in a Texture2D object After creation, the rect will be the size of the texture, and the offset will be (0,0). More... | |
local | createWithTexture ( local texture) |
Creates a sprite with an exsiting texture contained in a Texture2D object After creation, the rect will be the size of the texture, and the offset will be (0,0). More... | |
static Sprite * | createWithTexture (Texture2D *texture, const Rect &rect) |
Creates a sprite with a texture and a rect. More... | |
local | createWithTexture ( local texture, local rect) |
Creates a sprite with a texture and a rect. More... | |
static Sprite * | createWithSpriteFrame (SpriteFrame *pSpriteFrame) |
Creates a sprite with an sprite frame. More... | |
static Sprite * | createWithSpriteFrameName (const char *spriteFrameName) |
Creates a sprite with an sprite frame name. More... | |
local | createWithSpriteFrameName ( local spriteFrameName) |
Creates a sprite with an sprite frame name. More... | |
Initializers | |
Sprite (void) | |
Default constructor. More... | |
virtual | ~Sprite (void) |
Default destructor. More... | |
virtual bool | init (void) |
Initializes an empty sprite with nothing init. More... | |
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... | |
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 char *spriteFrameName) |
Initializes a sprite with an sprite frame name. More... | |
virtual bool | initWithFile (const char *filename) |
Initializes a sprite with an image filename. More... | |
var | init ( var filename) |
Initializes a sprite with an image filename. More... | |
local | init ( local filename) |
Initializes a sprite with an image filename. More... | |
virtual bool | initWithFile (const char *filename, const Rect &rect) |
Initializes a sprite with an image filename, and a rect. 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 methods | |
virtual void | setTextureRect (const Rect &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... | |
Frames methods | |
virtual void | setDisplayFrame (SpriteFrame *pNewFrame) |
Sets a new display frame to the Sprite. More... | |
virtual bool | isFrameDisplayed (SpriteFrame *pFrame) const |
Returns whether or not a SpriteFrame is being displayed. More... | |
var | isFrameDisplayed ( var pFrame) |
Returns whether or not a SpriteFrame is being displayed. More... | |
local | isFrameDisplayed ( local pFrame) |
Returns whether or not a SpriteFrame is being displayed. More... | |
virtual CC_DEPRECATED_ATTRIBUTE SpriteFrame * | displayFrame () |
local | displayFrame () |
virtual SpriteFrame * | getDisplayFrame () |
Returns the current displayed frame. More... | |
Animation methods | |
virtual void | setDisplayFrameWithAnimationName (const char *animationName, int frameIndex) |
Changes the display frame with animation name and index. More... | |
var | setDisplayFrameWithAnimationName ( var animationName, var frameIndex) |
Changes the display frame with animation name and index. More... | |
local | setDisplayFrameWithAnimationName ( local animationName, local 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... | |
var | isDirty () |
Whether or not the Sprite needs to be updated in the Atlas. More... | |
local | isDirty () |
Whether or not the Sprite needs to be updated in the Atlas. More... | |
virtual void | setDirty (bool bDirty) |
Makes the Sprite to be updated in the Atlas. More... | |
var | setDirty ( var bDirty) |
Makes the Sprite to be updated in the Atlas. More... | |
local | setDirty ( local bDirty) |
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... | |
local | isTextureRectRotated () |
Returns whether or not the texture rectangle is rotated. More... | |
int | getAtlasIndex (void) const |
Returns the index used on the TextureAtlas. More... | |
void | setAtlasIndex (int 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... | |
const Point & | getOffsetPosition (void) const |
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... | |
CC_DEPRECATED_ATTRIBUTE bool | isFlipX () |
CC_DEPRECATED_ATTRIBUTE void | setFlipX (bool 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 | |
virtual void | setTexture (Texture2D *texture) override |
Sets a new texuture. More... | |
virtual Texture2D * | getTexture () const override |
Returns the currently used texture. More... | |
local | getTexture () |
Returns the currently used texture. More... | |
void | setBlendFunc (const BlendFunc &blendFunc) override |
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 |
Changes the scale factor on X axis of this node. More... | |
virtual void | setScaleY (float scaleY) override |
Changes the scale factor on Y axis of this node. More... | |
virtual void | setPosition (const Point &pos) override |
Changes the position (x,y) of the node in OpenGL coordinates. More... | |
virtual void | setRotation (float rotation) override |
Sets the rotation (angle) of the node in degrees. More... | |
virtual void | setRotationX (float rotationX) override |
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. More... | |
virtual void | setRotationY (float rotationY) override |
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... | |
virtual void | setSkewY (float sy) override |
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... | |
local | removeAllChildrenWithCleanup ( local cleanup) |
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... | |
virtual void | addChild (Node *child) override |
Adds a child to the container with z-order as 0. More... | |
var | addChild ( var child) |
Adds a child to the container with z-order as 0. More... | |
local | addChild ( local child) |
Adds a child to the container with z-order as 0. More... | |
virtual void | addChild (Node *child, int zOrder) override |
Adds a child to the container with a z-order. More... | |
var | addChild ( var child, var zOrder) |
Adds a child to the container with a z-order. More... | |
local | addChild ( local child, local zOrder) |
Adds a child to the container with a z-order. 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 | sortAllChildren () override |
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 |
Changes both X and Y scale factor of the node. More... | |
local | setScale ( local scale) |
Changes both X and Y scale factor of the node. More... | |
virtual void | setVertexZ (float vertexZ) override |
Sets the real OpenGL Z vertex. More... | |
virtual void | setAnchorPoint (const Point &anchor) override |
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... | |
virtual void | draw (void) override |
Override this method to draw your own node. More... | |
Functions inherited from NodeRGBA | |
virtual void | setColor (const Color3B &color3) override |
Changes the color with R,G,B bytes. More... | |
virtual void | updateDisplayedColor (const Color3B &parentColor) override |
recursive method that updates display color More... | |
var | updateDisplayedColor ( var parentColor) |
recursive method that updates display color More... | |
local | updateDisplayedColor ( local parentColor) |
recursive method that updates display color More... | |
virtual void | setOpacity (GLubyte opacity) override |
Changes the opacity. More... | |
virtual void | setOpacityModifyRGB (bool modify) override |
Changes the OpacityModifyRGB property. More... | |
local | setOpacityModifyRGB ( local modify) |
Changes the OpacityModifyRGB property. More... | |
virtual bool | isOpacityModifyRGB (void) const override |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity) More... | |
virtual void | updateDisplayedOpacity (GLubyte parentOpacity) override |
recursive method that updates the displayed opacity. More... | |
Sprite | ( | void | ) |
Default constructor.
var ctor | ( | ) |
Default constructor.
local Sprite | ( | ) |
Default constructor.
|
virtual |
Default destructor.
|
overridevirtual |
Adds a child to the container with z-order as 0.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z-order as 0.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with z-order as 0.
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
child | A child node |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with a z-order.
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 setZOrder(int) |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with a z-order.
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 setZOrder(int) |
Reimplemented from Node.
|
overridevirtual |
Adds a child to the container with a z-order.
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 setZOrder(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 setZOrder(int) |
tag | A interger to identify the node easily. Please refer to setTag(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 setZOrder(int) |
tag | A interger to identify the node easily. Please refer to setTag(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 setZOrder(int) |
tag | A interger to identify the node easily. Please refer to setTag(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 | The string which indicates 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 | The string which indicates 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 | The string which indicates a path to image file, e.g., "scene1/monster.png". |
|
static |
Creates a sprite with an image filename and a rect.
filename | The string wich indicates a path to image file, e.g., "scene1/monster.png" |
rect | Only the contents inside rect of filename's texture will be applied for this sprite. |
|
static |
Creates a sprite with an image filename and a rect.
filename | The string wich indicates a path to image file, e.g., "scene1/monster.png" |
rect | Only the contents inside rect of filename's texture will be applied for this sprite. |
|
static |
Creates a sprite with an image filename and a rect.
filename | The string wich indicates a path to image file, e.g., "scene1/monster.png" |
rect | Only the contents inside rect of filename's texture will be applied for this sprite. |
|
static |
Creates a sprite with an sprite frame.
pSpriteFrame | A sprite frame which involves a texture and a rect |
|
static |
Creates a sprite with an sprite frame.
pSpriteFrame | A sprite frame which involves a texture and a rect |
|
static |
Creates a sprite with an sprite frame.
pSpriteFrame | 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 |
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. |
|
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. |
|
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. |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
overridevirtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
Reimplemented from Node.
Reimplemented in TextFieldTTF.
|
overridevirtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
Reimplemented from Node.
Reimplemented in TextFieldTTF.
|
overridevirtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
Reimplemented from Node.
Reimplemented in TextFieldTTF.
|
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.
|
virtual |
Returns the current displayed frame.
|
virtual |
Returns the current displayed frame.
|
virtual |
Returns the current displayed frame.
|
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.
|
overridevirtual |
Returns the currently used texture.
Implements TextureProtocol.
|
overridevirtual |
Returns the currently used texture.
Implements TextureProtocol.
|
overridevirtual |
Returns the currently used texture.
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 |
|
virtual |
|
virtual |
|
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 |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
Reimplemented from NodeRGBA.
|
overridevirtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
Reimplemented from NodeRGBA.
|
overridevirtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
Reimplemented from NodeRGBA.
|
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. |
zOrder | Z order for drawing priority. Please refer to setZOrder(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. |
zOrder | Z order for drawing priority. Please refer to setZOrder(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. |
zOrder | Z order for drawing priority. Please refer to setZOrder(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.
|
overridevirtual |
Changes the color with R,G,B bytes.
color | Example: Color3B(255,100,0) means R=255, G=100, B=0 |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the color with R,G,B bytes.
color | Example: Color3B(255,100,0) means R=255, G=100, B=0 |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the color with R,G,B bytes.
color | Example: Color3B(255,100,0) means R=255, G=100, B=0 |
Reimplemented from NodeRGBA.
|
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 |
|
virtual |
Sets a new display frame to the Sprite.
|
virtual |
Sets a new display frame to the Sprite.
|
virtual |
Sets a new display frame to the Sprite.
|
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.
bFlipX | true if the sprite should be flipped horizaontally, false otherwise. |
var setFlippedX | ( | var | flippedX) |
Sets whether the sprite should be flipped horizontally or not.
bFlipX | true if the sprite should be flipped horizaontally, false otherwise. |
local setFlippedX | ( | local | flippedX) |
Sets whether the sprite should be flipped horizontally or not.
bFlipX | true if the sprite should be flipped horizaontally, false otherwise. |
void setFlippedY | ( | bool | flippedY) |
Sets whether the sprite should be flipped vertically or not.
bFlipY | true if the sprite should be flipped vertically, flase otherwise. |
var setFlippedY | ( | var | flippedY) |
Sets whether the sprite should be flipped vertically or not.
bFlipY | true if the sprite should be flipped vertically, flase otherwise. |
local setFlippedY | ( | local | flippedY) |
Sets whether the sprite should be flipped vertically or not.
bFlipY | true if the sprite should be flipped vertically, flase otherwise. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Changes the opacity.
opacity | Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the opacity.
opacity | Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the opacity.
opacity | Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
value | If true, then the opacity will be applied as: glColor(R,G,B,opacity); If false, then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
value | If true, then the opacity will be applied as: glColor(R,G,B,opacity); If false, then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
value | If true, then the opacity will be applied as: glColor(R,G,B,opacity); If false, then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); |
Reimplemented from NodeRGBA.
|
overridevirtual |
Changes the position (x,y) of the node in OpenGL coordinates.
Usually we use Point(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen. For example, this codesnip 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.
|
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.
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.
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.
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.
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.
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.
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 |
Changes both X and Y scale factor of the node.
1.0 is the default scale factor. It modifies the X and Y scale at the same time.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes both X and Y scale factor of the node.
1.0 is the default scale factor. It modifies the X and Y scale at the same time.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes both X and Y scale factor of the node.
1.0 is the default scale factor. It modifies the X and Y scale at the same time.
scale | The scale factor for both X and Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on X axis of this node.
The deafult value is 1.0 if you haven't changed it before
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on X axis of this node.
The deafult value is 1.0 if you haven't changed it before
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on X axis of this node.
The deafult value is 1.0 if you haven't changed it before
scaleX | The scale factor on X axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on Y axis of this node.
The Default value is 1.0 if you haven't changed it before.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on Y axis of this node.
The Default value is 1.0 if you haven't changed it before.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the scale factor on Y axis of this node.
The Default value is 1.0 if you haven't changed it before.
scaleY | The scale factor on Y axis. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y axis and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
fSkewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y axis and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
fSkewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the X skew angle of the node in degrees.
This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y axis and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.
fSkewX | The X skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X axis and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
fSkewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X axis and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
fSkewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Changes the Y skew angle of the node in degrees.
This angle describes the shear distortion in the Y direction. Thus, it is the angle between the X axis and the bottom edge of the shape The default skewY angle is 0. Positive values distort the node in a CCW direction.
fSkewY | The Y skew angle of the node in degrees. |
Reimplemented from Node.
|
overridevirtual |
Sets a new texuture.
It will be retained.
texture | A valid Texture2D object, which will be applied to this sprite object. |
Implements TextureProtocol.
|
overridevirtual |
Sets a new texuture.
It will be retained.
texture | A valid Texture2D object, which will be applied to this sprite object. |
Implements TextureProtocol.
|
overridevirtual |
Sets a new texuture.
It will be retained.
texture | A valid Texture2D object, which will be applied to this sprite object. |
Implements TextureProtocol.
|
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 the real OpenGL Z vertex.
Differences between openGL Z vertex and cocos2d Z order:
vertexZ | OpenGL Z vertex of this node. |
Reimplemented from Node.
|
overridevirtual |
Sets the real OpenGL Z vertex.
Differences between openGL Z vertex and cocos2d Z order:
vertexZ | OpenGL Z vertex of this node. |
Reimplemented from Node.
|
overridevirtual |
Sets the real OpenGL Z vertex.
Differences between openGL Z vertex and cocos2d Z order:
vertexZ | OpenGL Z vertex of this node. |
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 |
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 |
|
protected |
|
protected |
|
protected |
|
overridevirtual |
recursive method that updates display color
Reimplemented from NodeRGBA.
|
overridevirtual |
recursive method that updates display color
Reimplemented from NodeRGBA.
|
overridevirtual |
recursive method that updates display color
Reimplemented from NodeRGBA.
|
overridevirtual |
recursive method that updates the displayed opacity.
Reimplemented from NodeRGBA.
|
overridevirtual |
recursive method that updates the displayed opacity.
Reimplemented from NodeRGBA.
|
overridevirtual |
recursive method that updates the displayed opacity.
Reimplemented from NodeRGBA.
|
virtual |
|
virtual |
|
virtual |
|
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 horizaontally or not.
|
protected |
Whether the sprite is flipped horizaontally or not.
|
protected |
Whether the sprite is flipped horizaontally or not.
|
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 |
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 |
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 the sprite contains children.
|
protected |
Whether the sprite contains children.
|
protected |
Whether the sprite contains children.
|
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 |