Skip to main content

CCSpriteFrame

CCSpriteFrame

Cocos2D

Inheritance: System.Object

Implements: Cocos2D.ICCCopyable

Constructors

CCSpriteFrame()

CCSpriteFrame()()

CCSpriteFrame(CCTexture2D, CCRect)

CCSpriteFrame(CCTexture2D, CCRect)(Cocos2D.CCTexture2D pobTexture, Cocos2D.CCRect rect)
Parameters:
pobTexture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)

CCSpriteFrame(CCTexture2D, CCRect, bool, CCPoint, CCSize)

CCSpriteFrame(CCTexture2D, CCRect, bool, CCPoint, CCSize)(Cocos2D.CCTexture2D pobTexture, Cocos2D.CCRect rect, System.Boolean rotated, Cocos2D.CCPoint offset, Cocos2D.CCSize originalSize)
Parameters:
pobTexture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)
rotated (System.Boolean)
offset (Cocos2D.CCPoint)
originalSize (Cocos2D.CCSize)

Fields

m_bRotated(System.Boolean)
m_obOffset(Cocos2D.CCPoint)
m_obOffsetInPixels(Cocos2D.CCPoint)
m_obOriginalSize(Cocos2D.CCSize)
m_obOriginalSizeInPixels(Cocos2D.CCSize)
m_obRect(Cocos2D.CCRect)
m_obRectInPixels(Cocos2D.CCRect)
m_pobTexture(Cocos2D.CCTexture2D)
m_strTextureFilename(System.String)

Properties

ContentSize(Cocos2D.CCSize)
IsRotated(System.Boolean)
Offset(Cocos2D.CCPoint)
OffsetInPixels(Cocos2D.CCPoint)
OriginalSizeInPixels(Cocos2D.CCSize)
Rect(Cocos2D.CCRect)

get or set rect of the frame

RectInPixels(Cocos2D.CCRect)
Texture(Cocos2D.CCTexture2D)

get or set texture of the frame

TextureFilename(System.String)

Methods

Copy()

Cocos2D.CCSpriteFrame Copy()()
Returns:
Cocos2D.CCSpriteFrame

Copy(ICCCopyable)

System.Object Copy(ICCCopyable)(Cocos2D.ICCCopyable pZone)
Parameters:
pZone (Cocos2D.ICCCopyable)
Returns:
System.Object
Example

InitWithTexture(CCTexture2D, CCRect)

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

InitWithTexture(CCTexture2D, CCRect, bool, CCPoint, CCSize)

System.Boolean InitWithTexture(CCTexture2D, CCRect, bool, CCPoint, CCSize)(Cocos2D.CCTexture2D pobTexture, Cocos2D.CCRect rect, System.Boolean rotated, Cocos2D.CCPoint offset, Cocos2D.CCSize originalSize)
Parameters:
pobTexture (Cocos2D.CCTexture2D)
rect (Cocos2D.CCRect)
rotated (System.Boolean)
offset (Cocos2D.CCPoint)
originalSize (Cocos2D.CCSize)
Returns:
System.Boolean

InitWithTextureFilename(string, CCRect)

System.Boolean InitWithTextureFilename(string, CCRect)(System.String filename, Cocos2D.CCRect rect)
Parameters:
filename (System.String)
rect (Cocos2D.CCRect)
Returns:
System.Boolean

InitWithTextureFilename(string, CCRect, bool, CCPoint, CCSize)

System.Boolean InitWithTextureFilename(string, CCRect, bool, CCPoint, CCSize)(System.String filename, Cocos2D.CCRect rect, System.Boolean rotated, Cocos2D.CCPoint offset, Cocos2D.CCSize originalSize)
Parameters:
filename (System.String)
rect (Cocos2D.CCRect)
rotated (System.Boolean)
offset (Cocos2D.CCPoint)
originalSize (Cocos2D.CCSize)
Returns:
System.Boolean