Skip to main content

CCSprite

CCSprite

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

CCSprite()

CCSprite()()

CCSprite(CCRect)

CCSprite(CCRect)(Cocos2D.CCRect rect)
Parameters:
rect (Cocos2D.CCRect)

CCSprite(CCSize)

CCSprite(CCSize)(Cocos2D.CCSize size)
Parameters:
size (Cocos2D.CCSize)

CCSprite(CCSpriteFrame)

CCSprite(CCSpriteFrame)(Cocos2D.CCSpriteFrame pSpriteFrame)
Parameters:
pSpriteFrame (Cocos2D.CCSpriteFrame)

CCSprite(CCTexture2D)

CCSprite(CCTexture2D)(Cocos2D.CCTexture2D texture)
Parameters:
texture (Cocos2D.CCTexture2D)

CCSprite(CCTexture2D, CCRect)

CCSprite(CCTexture2D, CCRect)(Cocos2D.CCTexture2D texture, Cocos2D.CCRect rect)
Parameters:
texture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)

CCSprite(string)

CCSprite(string)(System.String fileName)
Parameters:
fileName (System.String)

CCSprite(string, CCRect)

CCSprite(string, CCRect)(System.String fileName, Cocos2D.CCRect rect)
Parameters:
fileName (System.String)
rect (Cocos2D.CCRect)

Fields

m_bDirty(System.Boolean)
m_bFlipX(System.Boolean)
m_bFlipY(System.Boolean)
m_bHasChildren(System.Boolean)
m_bOpacityModifyRGB(System.Boolean)
m_bRectRotated(System.Boolean)
m_bRecursiveDirty(System.Boolean)
m_bShouldBeHidden(System.Boolean)
m_obOffsetPosition(Cocos2D.CCPoint)
m_obRect(Cocos2D.CCRect)
m_obUnflippedOffsetPositionFromCenter(Cocos2D.CCPoint)
m_pobBatchNode(Cocos2D.CCSpriteBatchNode)
m_pobTexture(Cocos2D.CCTexture2D)
m_pobTextureAtlas(Cocos2D.CCTextureAtlas)
m_sBlendFunc(Cocos2D.CCBlendFunc)
m_transformToBatch(Cocos2D.CCAffineTransform)
m_uAtlasIndex(System.Int32)

Properties

AnchorPoint(Cocos2D.CCPoint)
AtlasIndex(System.Int32)
BatchNode(Cocos2D.CCSpriteBatchNode)
BlendFunc(Cocos2D.CCBlendFunc)
Color(Cocos2D.CCColor3B)
ContentSize(Cocos2D.CCSize)
Dirty(System.Boolean)
DisplayFrame(Cocos2D.CCSpriteFrame)
FlipX(System.Boolean)
FlipY(System.Boolean)
HalfTexelOffset(System.Boolean)
IgnoreAnchorPointForPosition(System.Boolean)
IsAntialiased(System.Boolean)
IsOpacityModifyRGB(System.Boolean)
IsTextureRectRotated(System.Boolean)
OffsetPosition(Cocos2D.CCPoint)
Opacity(System.Byte)
Position(Cocos2D.CCPoint)
Quad(Cocos2D.CCV3F_C4B_T2F_Quad)
Rotation(System.Single)
RotationX(System.Single)
RotationY(System.Single)
Scale(System.Single)
ScaleX(System.Single)
ScaleY(System.Single)
SkewX(System.Single)
SkewY(System.Single)
SpriteFrame(Cocos2D.CCSpriteFrame)
Texture(Cocos2D.CCTexture2D)
TextureRect(Cocos2D.CCRect)
TextureRectInPixels(Cocos2D.CCRect)
UntrimmedSizeInPixels(Cocos2D.CCSize)
VertexZ(System.Single)
Visible(System.Boolean)

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

Deserialize(Stream)

Deserialize(Stream)(System.IO.Stream stream)
Parameters:
stream (System.IO.Stream)
Example

Draw()

Draw()()
Example

Init()

System.Boolean Init()()
Returns:
System.Boolean
Example

InitWithFile(string)

System.Boolean InitWithFile(string)(System.String fileName)
Parameters:
fileName (System.String)
Returns:
System.Boolean

InitWithFile(string, CCRect)

System.Boolean InitWithFile(string, CCRect)(System.String fileName, Cocos2D.CCRect rect)
Parameters:
fileName (System.String)
rect (Cocos2D.CCRect)
Returns:
System.Boolean

InitWithSpriteFrame(CCSpriteFrame)

System.Boolean InitWithSpriteFrame(CCSpriteFrame)(Cocos2D.CCSpriteFrame pSpriteFrame)
Parameters:
pSpriteFrame (Cocos2D.CCSpriteFrame)
Returns:
System.Boolean

InitWithTexture(CCTexture2D)

System.Boolean InitWithTexture(CCTexture2D)(Cocos2D.CCTexture2D texture)
Parameters:
texture (Cocos2D.CCTexture2D)
Returns:
System.Boolean

InitWithTexture(CCTexture2D, CCRect)

System.Boolean InitWithTexture(CCTexture2D, CCRect)(Cocos2D.CCTexture2D texture, Cocos2D.CCRect rect)
Parameters:
texture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)
Returns:
System.Boolean

InitWithTexture(CCTexture2D, CCRect, bool)

System.Boolean InitWithTexture(CCTexture2D, CCRect, bool)(Cocos2D.CCTexture2D pTexture, Cocos2D.CCRect rect, System.Boolean rotated)
Parameters:
pTexture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)
rotated (System.Boolean)
Returns:
System.Boolean

IsSpriteFrameDisplayed(CCSpriteFrame)

System.Boolean IsSpriteFrameDisplayed(CCSpriteFrame)(Cocos2D.CCSpriteFrame frame)
Parameters:
frame (Cocos2D.CCSpriteFrame)
Returns:
System.Boolean

OnExit()

OnExit()()
Example

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

ReorderChild(CCNode, int)

ReorderChild(CCNode, int)(Cocos2D.CCNode child, System.Int32 zOrder)
Parameters:
child (Cocos2D.CCNode)
zOrder (System.Int32)
Example

ScaleTo(CCSize)

ScaleTo(CCSize)(Cocos2D.CCSize size)
Parameters:
size (Cocos2D.CCSize)

Serialize(Stream)

Serialize(Stream)(System.IO.Stream stream)
Parameters:
stream (System.IO.Stream)
Example

SetDirtyRecursively(bool)

SetDirtyRecursively(bool)(System.Boolean bValue)
Parameters:
bValue (System.Boolean)

SetDisplayFrameWithAnimationName(string, int)

SetDisplayFrameWithAnimationName(string, int)(System.String animationName, System.Int32 frameIndex)
Parameters:
animationName (System.String)
frameIndex (System.Int32)

SetPosition(float, float)

SetPosition(float, float)(System.Single x, System.Single y)
Parameters:
x (System.Single)
y (System.Single)
Example

SetReorderChildDirtyRecursively()

SetReorderChildDirtyRecursively()()

SetTextureRect(CCRect)

SetTextureRect(CCRect)(Cocos2D.CCRect rect)
Parameters:
rect (Cocos2D.CCRect)

SetTextureRect(CCRect, bool, CCSize)

SetTextureRect(CCRect, bool, CCSize)(Cocos2D.CCRect value, System.Boolean rotated, Cocos2D.CCSize untrimmedSize)
Parameters:
value (Cocos2D.CCRect)
rotated (System.Boolean)
untrimmedSize (Cocos2D.CCSize)

SetVertexRect(CCRect)

SetVertexRect(CCRect)(Cocos2D.CCRect rect)
Parameters:
rect (Cocos2D.CCRect)

SortAllChildren()

SortAllChildren()()
Example

UpdateBlendFunc()

UpdateBlendFunc()()

UpdateDisplayedColor(CCColor3B)

UpdateDisplayedColor(CCColor3B)(Cocos2D.CCColor3B parentColor)
Parameters:
parentColor (Cocos2D.CCColor3B)
Example

UpdateDisplayedOpacity(byte)

UpdateDisplayedOpacity(byte)(System.Byte parentOpacity)
Parameters:
parentOpacity (System.Byte)
Example

UpdateTransform()

UpdateTransform()()
Example

VisitRenderer(ref CCAffineTransform)

VisitRenderer(ref CCAffineTransform)(Cocos2D.CCAffineTransform worldTransform)
Parameters:
worldTransform (Cocos2D.CCAffineTransform)
Example