Skip to main content

CCAtlasNode

CCAtlasNode

Cocos2D

Inheritance: 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

CCAtlasNode(CCTexture2D, int, int, int)

CCAtlasNode(CCTexture2D, int, int, int)(Cocos2D.CCTexture2D texture, System.Int32 tileWidth, System.Int32 tileHeight, System.Int32 itemsToRender)
Parameters:
texture (Cocos2D.CCTexture2D)
tileWidth (System.Int32)
tileHeight (System.Int32)
itemsToRender (System.Int32)

CCAtlasNode(string, int, int, int)

CCAtlasNode(string, int, int, int)(System.String tile, System.Int32 tileWidth, System.Int32 tileHeight, System.Int32 itemsToRender)
Parameters:
tile (System.String)
tileWidth (System.Int32)
tileHeight (System.Int32)
itemsToRender (System.Int32)

Fields

m_bIgnoreContentScaleFactor(System.Boolean)
m_bIsOpacityModifyRGB(System.Boolean)
m_nUniformColor(System.Int32)
m_pTextureAtlas(Cocos2D.CCTextureAtlas)
m_tBlendFunc(Cocos2D.CCBlendFunc)
m_tColorUnmodified(Cocos2D.CCColor3B)
m_uItemHeight(System.Int32)
m_uItemWidth(System.Int32)
m_uItemsPerColumn(System.Int32)
m_uItemsPerRow(System.Int32)
m_uQuadsToDraw(System.Int32)

Properties

BlendFunc(Cocos2D.CCBlendFunc)

gets or sets the source blending function for the texture

Color(Cocos2D.CCColor3B)

Gets or sets the color

IsAntialiased(System.Boolean)
IsOpacityModifyRGB(System.Boolean)

sets the premultipliedAlphaOpacity property. If set to NO then opacity will be applied as: glColor(R,G,B,opacity); If set to YES then oapcity will be applied as: glColor(opacity, opacity, opacity, opacity ); Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO @since v0.8

Opacity(System.Byte)

Gets or sets the Opacity @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed. Values goes from 0 to 255, where 255 means fully opaque.

QuadsToDraw(System.Int32)
Texture(Cocos2D.CCTexture2D)

gets or sets a new texture. it will be retained

TextureAtlas(Cocos2D.CCTextureAtlas)

Methods

Draw()

Draw()()

This is called from the Visit() method. This is where you DRAW your node. Only draw stuff from this method call.

Example

InitWithTexture(CCTexture2D, int, int, int)

System.Boolean InitWithTexture(CCTexture2D, int, int, int)(Cocos2D.CCTexture2D texture, System.Int32 tileWidth, System.Int32 tileHeight, System.Int32 itemsToRender)
Parameters:
texture (Cocos2D.CCTexture2D)
tileWidth (System.Int32)
tileHeight (System.Int32)
itemsToRender (System.Int32)
Returns:
System.Boolean

InitWithTileFile(string, int, int, int)

System.Boolean InitWithTileFile(string, int, int, int)(System.String tile, System.Int32 tileWidth, System.Int32 tileHeight, System.Int32 itemsToRender)
Parameters:
tile (System.String)
tileWidth (System.Int32)
tileHeight (System.Int32)
itemsToRender (System.Int32)
Returns:
System.Boolean

SetIgnoreContentScaleFactor(bool)

SetIgnoreContentScaleFactor(bool)(System.Boolean bIgnoreContentScaleFactor)
Parameters:
bIgnoreContentScaleFactor (System.Boolean)

UpdateAtlasValues()

UpdateAtlasValues()()