2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Sprite
|
2014-03-26 14:03:04 +08:00
|
|
|
-- @extend Node,TextureProtocol
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.SpriteFrame
|
|
|
|
-- @overload self, string
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setSpriteFrame
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string spriteFrameName
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Texture2D
|
|
|
|
-- @overload self, string
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setTexture
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string filename
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Returns the Texture2D object used by the sprite.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getTexture
|
|
|
|
-- @param self
|
|
|
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets whether the sprite should be flipped vertically or not.<br>
|
|
|
|
-- param flippedY true if the sprite should be flipped vertically, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setFlippedY
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool flippedY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets whether the sprite should be flipped horizontally or not.<br>
|
|
|
|
-- param flippedX true if the sprite should be flipped horizontally, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setFlippedX
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool flippedX
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-12-04 17:48:13 +08:00
|
|
|
--------------------------------
|
|
|
|
-- / @}
|
|
|
|
-- @function [parent=#Sprite] getResourceType
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, cc.Texture2D, rect_table
|
|
|
|
-- @overload self, cc.Texture2D
|
|
|
|
-- @overload self, cc.Texture2D, rect_table, bool
|
|
|
|
-- @function [parent=#Sprite] initWithTexture
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Texture2D texture
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @param #bool rotated
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Returns the batch node object if this sprite is rendered by SpriteBatchNode.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,<br>
|
|
|
|
-- nullptr if the sprite isn't used batch node.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getBatchNode
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getOffsetPosition
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] removeAllChildrenWithCleanup
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool cleanup
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, rect_table, bool, size_table
|
|
|
|
-- @overload self, rect_table
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setTextureRect
|
|
|
|
-- @param self
|
|
|
|
-- @param #rect_table rect
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool rotated
|
|
|
|
-- @param #size_table untrimmedSize
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Initializes a sprite with an sprite frame name.<br>
|
|
|
|
-- A SpriteFrame will be fetched from the SpriteFrameCache by name.<br>
|
|
|
|
-- If the SpriteFrame doesn't exist it will raise an exception.<br>
|
2015-10-26 09:45:38 +08:00
|
|
|
-- param spriteFrameName A key string that can fected a valid SpriteFrame from SpriteFrameCache.<br>
|
2015-05-05 11:31:53 +08:00
|
|
|
-- return True if the sprite is initialized properly, false otherwise.
|
|
|
|
-- @function [parent=#Sprite] initWithSpriteFrameName
|
|
|
|
-- @param self
|
|
|
|
-- @param #string spriteFrameName
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Returns whether or not a SpriteFrame is being displayed.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] isFrameDisplayed
|
|
|
|
-- @param self
|
2014-12-30 16:30:45 +08:00
|
|
|
-- @param #cc.SpriteFrame frame
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the index used on the TextureAtlas.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getAtlasIndex
|
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @return long#long ret (return value: long)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 22:37:03 +08:00
|
|
|
-- Sets the batch node to sprite.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- warning This method is not recommended for game developers. Sample code for using batch node<br>
|
|
|
|
-- code<br>
|
|
|
|
-- SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15);<br>
|
|
|
|
-- Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57));<br>
|
|
|
|
-- batch->addChild(sprite);<br>
|
|
|
|
-- layer->addChild(batch);<br>
|
|
|
|
-- endcode
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setBatchNode
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.SpriteBatchNode spriteBatchNode
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-01-14 16:26:14 +08:00
|
|
|
--------------------------------
|
|
|
|
-- js NA<br>
|
|
|
|
-- lua NA
|
|
|
|
-- @function [parent=#Sprite] getBlendFunc
|
|
|
|
-- @param self
|
|
|
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- / @{/ @name Animation methods<br>
|
|
|
|
-- Changes the display frame with animation name and index.<br>
|
2015-03-17 14:28:14 +08:00
|
|
|
-- The animation name will be get from the AnimationCache.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setDisplayFrameWithAnimationName
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string animationName
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long frameIndex
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setTextureAtlas
|
|
|
|
-- @param self
|
2014-12-30 16:30:45 +08:00
|
|
|
-- @param #cc.TextureAtlas textureAtlas
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the current displayed frame.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getSpriteFrame
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
|
|
|
|
|
2015-12-04 17:48:13 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Sprite] getResourceName
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Whether or not the Sprite needs to be updated in the Atlas.<br>
|
2015-03-23 22:37:03 +08:00
|
|
|
-- return True if the sprite needs to be updated in the Atlas, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] isDirty
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the index used on the TextureAtlas.<br>
|
2015-03-17 14:28:14 +08:00
|
|
|
-- warning Don't modify this value unless you know what you are doing.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setAtlasIndex
|
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long atlasIndex
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Makes the Sprite to be updated in the Atlas.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setDirty
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool dirty
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns whether or not the texture rectangle is rotated.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] isTextureRectRotated
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Returns the rect of the Sprite in points.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getTextureRect
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, string, rect_table
|
|
|
|
-- @overload self, string
|
|
|
|
-- @function [parent=#Sprite] initWithFile
|
|
|
|
-- @param self
|
|
|
|
-- @param #string filename
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2015-01-14 16:26:14 +08:00
|
|
|
--------------------------------
|
2015-03-23 22:37:03 +08:00
|
|
|
-- / @{/ @name Functions inherited from TextureProtocol.<br>
|
2015-01-14 16:26:14 +08:00
|
|
|
-- code<br>
|
2015-03-17 14:28:14 +08:00
|
|
|
-- When this function bound into js or lua,the parameter will be changed.<br>
|
2015-03-23 22:37:03 +08:00
|
|
|
-- In js: var setBlendFunc(var src, var dst).<br>
|
|
|
|
-- In lua: local setBlendFunc(local src, local dst).<br>
|
2015-01-14 16:26:14 +08:00
|
|
|
-- endcode
|
|
|
|
-- @function [parent=#Sprite] setBlendFunc
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.BlendFunc blendFunc
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2015-01-14 16:26:14 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] getTextureAtlas
|
|
|
|
-- @param self
|
|
|
|
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite.<br>
|
|
|
|
-- param spriteFrame A SpriteFrame object. It should includes a valid texture and a rect.<br>
|
|
|
|
-- return True if the sprite is initialized properly, false otherwise.
|
|
|
|
-- @function [parent=#Sprite] initWithSpriteFrame
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.SpriteFrame spriteFrame
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the flag which indicates whether the sprite is flipped horizontally or not.<br>
|
|
|
|
-- It only flips the texture of the sprite, and not the texture of the sprite's children.<br>
|
|
|
|
-- Also, flipping the texture doesn't alter the anchorPoint.<br>
|
|
|
|
-- If you want to flip the anchorPoint too, and/or to flip the children too use:<br>
|
|
|
|
-- sprite->setScaleX(sprite->getScaleX() * -1);<br>
|
|
|
|
-- return true if the sprite is flipped horizontally, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] isFlippedX
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Return the flag which indicates whether the sprite is flipped vertically or not.<br>
|
|
|
|
-- It only flips the texture of the sprite, and not the texture of the sprite's children.<br>
|
|
|
|
-- Also, flipping the texture doesn't alter the anchorPoint.<br>
|
|
|
|
-- If you want to flip the anchorPoint too, and/or to flip the children too use:<br>
|
|
|
|
-- sprite->setScaleY(sprite->getScaleY() * -1);<br>
|
|
|
|
-- return true if the sprite is flipped vertically, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] isFlippedY
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the vertex rect.<br>
|
|
|
|
-- It will be called internally by setTextureRect.<br>
|
|
|
|
-- Useful if you want to create 2x images from SD images in Retina Display.<br>
|
|
|
|
-- Do not call it manually. Use setTextureRect instead.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Sprite] setVertexRect
|
|
|
|
-- @param self
|
|
|
|
-- @param #rect_table rect
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-06-18 13:43:02 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, cc.Texture2D, rect_table, bool
|
|
|
|
-- @overload self, cc.Texture2D
|
|
|
|
-- @function [parent=#Sprite] createWithTexture
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Texture2D texture
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @param #bool rotated
|
|
|
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Creates a sprite with an sprite frame name.<br>
|
|
|
|
-- A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.<br>
|
|
|
|
-- If the SpriteFrame doesn't exist it will raise an exception.<br>
|
|
|
|
-- param spriteFrameName A null terminated string which indicates the sprite frame name.<br>
|
|
|
|
-- return An autoreleased sprite object.
|
|
|
|
-- @function [parent=#Sprite] createWithSpriteFrameName
|
|
|
|
-- @param self
|
|
|
|
-- @param #string spriteFrameName
|
|
|
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Creates a sprite with an sprite frame.<br>
|
|
|
|
-- param spriteFrame A sprite frame which involves a texture and a rect.<br>
|
|
|
|
-- return An autoreleased sprite object.
|
|
|
|
-- @function [parent=#Sprite] createWithSpriteFrame
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.SpriteFrame spriteFrame
|
|
|
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Node, int, string
|
|
|
|
-- @overload self, cc.Node, int, int
|
2014-06-25 14:17:41 +08:00
|
|
|
-- @function [parent=#Sprite] addChild
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #int zOrder
|
|
|
|
-- @param #int tag
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-06-25 14:17:41 +08:00
|
|
|
|
2015-03-17 14:28:14 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Sprite] setAnchorPoint
|
|
|
|
-- @param self
|
|
|
|
-- @param #vec2_table anchor
|
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Sprite] setRotationSkewX
|
|
|
|
-- @param self
|
|
|
|
-- @param #float rotationX
|
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Sprite] setScaleY
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scaleY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @overload self, float
|
|
|
|
-- @overload self, float, float
|
|
|
|
-- @function [parent=#Sprite] setScale
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scaleX
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #float scaleY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2015-03-17 14:28:14 +08:00
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Sprite] isOpacityModifyRGB
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setOpacityModifyRGB
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #bool modify
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Sprite] init
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setRotation
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #float rotation
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] draw
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #cc.Renderer renderer
|
|
|
|
-- @param #mat4_table transform
|
|
|
|
-- @param #unsigned int flags
|
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- / @{/ @name Functions inherited from Node.
|
|
|
|
-- @function [parent=#Sprite] setScaleX
|
|
|
|
-- @param self
|
|
|
|
-- @param #float scaleX
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-31 12:01:57 +08:00
|
|
|
-- js NA
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Sprite] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Sprite] setRotationSkewY
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float rotationY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] sortAllChildren
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] reorderChild
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #int zOrder
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] ignoreAnchorPointForPosition
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #bool value
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setPositionZ
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #float positionZ
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] removeChild
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #bool cleanup
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-17 14:28:14 +08:00
|
|
|
-- Updates the quad according the rotation, position, scale values.
|
|
|
|
-- @function [parent=#Sprite] updateTransform
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setSkewX
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #float sx
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setSkewY
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #float sy
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @function [parent=#Sprite] setVisible
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2015-03-17 14:28:14 +08:00
|
|
|
-- @param #bool bVisible
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- js ctor
|
|
|
|
-- @function [parent=#Sprite] Sprite
|
|
|
|
-- @param self
|
|
|
|
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|