CCSpriteBatchNode
CCSpriteBatchNode
Cocos2DInheritance: System.Object → Cocos2D.CCNode
Implements: Cocos2D.ICCSelectorProtocol, Cocos2D.ICCFocusable, Cocos2D.ICCTargetedTouchDelegate, Cocos2D.ICCStandardTouchDelegate, Cocos2D.ICCTouchDelegate, Cocos2D.ICCKeypadDelegate, Cocos2D.ICCKeyboardDelegate, Cocos2D.ICCRGBAProtocol, System.Collections.Generic.IComparer{Cocos2D.CCNode}, Cocos2D.ICCTextureProtocol, Cocos2D.ICCBlendProtocol
Constructors
CCSpriteBatchNode()
CCSpriteBatchNode()()
CCSpriteBatchNode(CCTexture2D)
CCSpriteBatchNode(CCTexture2D)(Cocos2D.CCTexture2D tex)
Parameters:
tex
(Cocos2D.CCTexture2D)CCSpriteBatchNode(CCTexture2D, int)
CCSpriteBatchNode(CCTexture2D, int)(Cocos2D.CCTexture2D tex, System.Int32 capacity)
Parameters:
tex
(Cocos2D.CCTexture2D)capacity
(System.Int32)CCSpriteBatchNode(string)
CCSpriteBatchNode(string)(System.String fileImage)
Parameters:
fileImage
(System.String)CCSpriteBatchNode(string, int)
CCSpriteBatchNode(string, int)(System.String fileImage, System.Int32 capacity)
Parameters:
fileImage
(System.String)capacity
(System.Int32)Fields
m_blendFunc(Cocos2D.CCBlendFunc)
m_pobDescendants(Cocos2D.CCRawListCocos2D.CCSprite)
m_pobTextureAtlas(Cocos2D.CCTextureAtlas)
Properties
BlendFunc(Cocos2D.CCBlendFunc)
gets or sets the source blending function for the texture
Descendants(Cocos2D.CCRawListCocos2D.CCSprite)
IsAntialiased(System.Boolean)
Texture(Cocos2D.CCTexture2D)
gets or sets a new texture. it will be retained
TextureAtlas(Cocos2D.CCTextureAtlas)
Methods
AddChild(CCNode, int, int)
AddChild(CCNode, int, int)(Cocos2D.CCNode child, System.Int32 zOrder, System.Int32 tag)
Parameters:
child
(Cocos2D.CCNode)zOrder
(System.Int32)tag
(System.Int32)Example
AddSpriteWithoutQuad(CCSprite, int, int)
Cocos2D.CCSpriteBatchNode AddSpriteWithoutQuad(CCSprite, int, int)(Cocos2D.CCSprite child, System.Int32 z, System.Int32 aTag)
Parameters:
child
(Cocos2D.CCSprite)z
(System.Int32)aTag
(System.Int32)Returns:
Cocos2D.CCSpriteBatchNode
AppendChild(CCSprite)
AppendChild(CCSprite)(Cocos2D.CCSprite sprite)
Parameters:
sprite
(Cocos2D.CCSprite)AtlasIndexForChild(CCSprite, int)
System.Int32 AtlasIndexForChild(CCSprite, int)(Cocos2D.CCSprite pobSprite, System.Int32 nZ)
Parameters:
pobSprite
(Cocos2D.CCSprite)nZ
(System.Int32)Returns:
System.Int32
Compare(CCNode, CCNode)
System.Int32 Compare(CCNode, CCNode)(Cocos2D.CCNode n1, Cocos2D.CCNode n2)
Parameters:
n1
(Cocos2D.CCNode)n2
(Cocos2D.CCNode)Returns:
System.Int32
Example
Draw()
Draw()()
This is called from the Visit() method. This is where you DRAW your node. Only draw stuff from this method call.
Example
HighestAtlasIndexInChild(CCSprite)
System.Int32 HighestAtlasIndexInChild(CCSprite)(Cocos2D.CCSprite pSprite)
Parameters:
pSprite
(Cocos2D.CCSprite)Returns:
System.Int32
IncreaseAtlasCapacity()
IncreaseAtlasCapacity()()
Init()
System.Boolean Init()()
Returns:
System.Boolean
Example
InitWithFile(string, int)
System.Boolean InitWithFile(string, int)(System.String fileImage, System.Int32 capacity)
Parameters:
fileImage
(System.String)capacity
(System.Int32)Returns:
System.Boolean
InitWithTexture(CCTexture2D, int)
System.Boolean InitWithTexture(CCTexture2D, int)(Cocos2D.CCTexture2D tex, System.Int32 capacity)
Parameters:
tex
(Cocos2D.CCTexture2D)capacity
(System.Int32)Returns:
System.Boolean
InsertQuadFromSprite(CCSprite, int)
InsertQuadFromSprite(CCSprite, int)(Cocos2D.CCSprite sprite, System.Int32 index)
Parameters:
sprite
(Cocos2D.CCSprite)index
(System.Int32)LowestAtlasIndexInChild(CCSprite)
System.Int32 LowestAtlasIndexInChild(CCSprite)(Cocos2D.CCSprite pSprite)
Parameters:
pSprite
(Cocos2D.CCSprite)Returns:
System.Int32
RebuildIndexInOrder(CCSprite, int)
System.Int32 RebuildIndexInOrder(CCSprite, int)(Cocos2D.CCSprite pobParent, System.Int32 uIndex)
Parameters:
pobParent
(Cocos2D.CCSprite)uIndex
(System.Int32)Returns:
System.Int32
RemoveAllChildren(bool)
RemoveAllChildren(bool)(System.Boolean cleanup)
Parameters:
cleanup
(System.Boolean)Example
RemoveChild(CCNode, bool)
RemoveChild(CCNode, bool)(Cocos2D.CCNode child, System.Boolean cleanup)
Parameters:
child
(Cocos2D.CCNode)cleanup
(System.Boolean)Example
RemoveChildAtIndex(int, bool)
RemoveChildAtIndex(int, bool)(System.Int32 index, System.Boolean doCleanup)
Parameters:
index
(System.Int32)doCleanup
(System.Boolean)RemoveSpriteFromAtlas(CCSprite)
RemoveSpriteFromAtlas(CCSprite)(Cocos2D.CCSprite pobSprite)
Parameters:
pobSprite
(Cocos2D.CCSprite)ReorderBatch(bool)
ReorderBatch(bool)(System.Boolean reorder)
Parameters:
reorder
(System.Boolean)ReorderChild(CCNode, int)
ReorderChild(CCNode, int)(Cocos2D.CCNode child, System.Int32 zOrder)
Parameters:
child
(Cocos2D.CCNode)zOrder
(System.Int32)Example
SortAllChildren()
SortAllChildren()()
Example
UpdateQuadFromSprite(CCSprite, int)
UpdateQuadFromSprite(CCSprite, int)(Cocos2D.CCSprite sprite, System.Int32 index)
Parameters:
sprite
(Cocos2D.CCSprite)index
(System.Int32)Visit()
Visit()()
This is called with every call to the MainLoop on the CCDirector class. In XNA, this is the same as the Draw() call.
Example