2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module SpriteBatchNode
|
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
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Append the child. <br>
|
|
|
|
-- param sprite A Sprite.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] appendChild
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Sprite sprite
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] reorderBatch
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #bool reorder
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] getTexture
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
--
|
|
|
|
-- @function [parent=#SpriteBatchNode] setTexture
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #cc.Texture2D texture
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-01-14 16:26:14 +08:00
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- Removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.<br>
|
|
|
|
-- param index A certain index.<br>
|
|
|
|
-- param doCleanup Whether or not to cleanup the running actions.<br>
|
|
|
|
-- warning Removing a child from a SpriteBatchNode is very slow.
|
|
|
|
-- @function [parent=#SpriteBatchNode] removeChildAtIndex
|
2015-01-14 16:26:14 +08:00
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long index
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #bool doCleanup
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2015-01-14 16:26:14 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- Remove a sprite from Atlas. <br>
|
|
|
|
-- param sprite A Sprite.
|
|
|
|
-- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @param #cc.Sprite sprite
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#SpriteBatchNode] addSpriteWithoutQuad
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Sprite child
|
|
|
|
-- @param #int z
|
|
|
|
-- @param #int aTag
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Get the nearest index from the sprite in z.<br>
|
|
|
|
-- param sprite The parent sprite.<br>
|
|
|
|
-- param z Z order for drawing priority.<br>
|
|
|
|
-- return Index.
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] atlasIndexForChild
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Sprite sprite
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int z
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @return long#long ret (return value: long)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- Increase the Atlas Capacity.
|
|
|
|
-- @function [parent=#SpriteBatchNode] increaseAtlasCapacity
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- Get the Min image block index,in all child. <br>
|
|
|
|
-- param sprite The parent sprite.<br>
|
|
|
|
-- return Index.
|
|
|
|
-- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #cc.Sprite sprite
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @return long#long ret (return value: long)
|
2014-04-10 14:19:59 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- lua NA
|
|
|
|
-- @function [parent=#SpriteBatchNode] getBlendFunc
|
|
|
|
-- @param self
|
|
|
|
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- initializes a SpriteBatchNode with a texture2d and capacity of children.<br>
|
|
|
|
-- The capacity will be increased in 33% in runtime if it runs out of space.
|
|
|
|
-- @function [parent=#SpriteBatchNode] initWithTexture
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Texture2D tex
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long capacity
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Sets the TextureAtlas object. <br>
|
|
|
|
-- param textureAtlas The TextureAtlas object.
|
|
|
|
-- @function [parent=#SpriteBatchNode] setTextureAtlas
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #cc.TextureAtlas textureAtlas
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-19 09:56:50 +08:00
|
|
|
|
2016-08-15 10:53:07 +08:00
|
|
|
--------------------------------
|
|
|
|
-- reserves capacity for the batch node.<br>
|
|
|
|
-- If the current capacity is bigger, nothing happens.<br>
|
|
|
|
-- otherwise, a new capacity is allocated
|
|
|
|
-- @function [parent=#SpriteBatchNode] reserveCapacity
|
|
|
|
-- @param self
|
|
|
|
-- @param #long newCapacity
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
|
|
|
|
2014-03-19 09:56:50 +08:00
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#SpriteBatchNode] removeAllChildrenWithCleanup
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #bool cleanup
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.<br>
|
2015-12-04 10:03:46 +08:00
|
|
|
-- This method should be called only when you are dealing with very big AtlasSprite and when most of the Sprite won't be updated.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont).
|
2014-04-10 14:19:59 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] insertQuadFromSprite
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-04-10 14:19:59 +08:00
|
|
|
-- @param #cc.Sprite sprite
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long index
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-05 11:31:53 +08:00
|
|
|
-- initializes a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children.<br>
|
|
|
|
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
|
|
|
-- The file will be loaded using the TextureMgr.<br>
|
|
|
|
-- js init<br>
|
|
|
|
-- lua init
|
|
|
|
-- @function [parent=#SpriteBatchNode] initWithFile
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @param self
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param #string fileImage
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long capacity
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- code<br>
|
|
|
|
-- When this function bound into js or lua,the parameter will be changed.<br>
|
|
|
|
-- In js: var setBlendFunc(var src, var dst).<br>
|
|
|
|
-- endcode<br>
|
|
|
|
-- lua NA
|
|
|
|
-- @function [parent=#SpriteBatchNode] setBlendFunc
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.BlendFunc blendFunc
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-19 09:56:50 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Rebuild index with a sprite all child. <br>
|
|
|
|
-- param parent The parent sprite.<br>
|
|
|
|
-- param index The child index.<br>
|
|
|
|
-- return Index.
|
2014-04-10 14:19:59 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] rebuildIndexInOrder
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Sprite parent
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long index
|
|
|
|
-- @return long#long ret (return value: long)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Returns the TextureAtlas object. <br>
|
|
|
|
-- return The TextureAtlas object.
|
|
|
|
-- @function [parent=#SpriteBatchNode] getTextureAtlas
|
|
|
|
-- @param self
|
|
|
|
-- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Get the Max image block index,in all child.<br>
|
|
|
|
-- param sprite The parent sprite.<br>
|
|
|
|
-- return Index.
|
2014-04-10 14:19:59 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @param #cc.Sprite sprite
|
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 16:32:54 +08:00
|
|
|
-- Creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.<br>
|
2015-02-12 18:47:08 +08:00
|
|
|
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- The file will be loaded using the TextureMgr.<br>
|
|
|
|
-- param fileImage A file image (.png, .jpeg, .pvr, etc).<br>
|
|
|
|
-- param capacity The capacity of children.<br>
|
|
|
|
-- return Return an autorelease object.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string fileImage
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long capacity
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Creates a SpriteBatchNode with a texture2d and capacity of children.<br>
|
|
|
|
-- The capacity will be increased in 33% in runtime if it runs out of space.<br>
|
|
|
|
-- param tex A texture2d.<br>
|
|
|
|
-- param capacity The capacity of children.<br>
|
|
|
|
-- return Return an autorelease object.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] createWithTexture
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Texture2D tex
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long capacity
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode)
|
|
|
|
|
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=#SpriteBatchNode] 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 SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-06-25 14:17:41 +08:00
|
|
|
|
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=#SpriteBatchNode] draw
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table transform
|
|
|
|
-- @param #unsigned int flags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
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=#SpriteBatchNode] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-05-23 11:12:39 +08:00
|
|
|
--------------------------------
|
2015-03-31 12:01:57 +08:00
|
|
|
-- js NA
|
2014-05-23 11:12:39 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] visit
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table parentTransform
|
|
|
|
-- @param #unsigned int parentFlags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-05-23 11:12:39 +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=#SpriteBatchNode] sortAllChildren
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
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=#SpriteBatchNode] removeChild
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #bool cleanup
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#SpriteBatchNode] 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
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#SpriteBatchNode] reorderChild
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #int zOrder
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- js ctor
|
|
|
|
-- @function [parent=#SpriteBatchNode] SpriteBatchNode
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteBatchNode#SpriteBatchNode self (return value: cc.SpriteBatchNode)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|