CCLayerColor
CCLayerColor
Cocos2DCCLayerColor is a subclass of CCLayer that implements the CCRGBAProtocol protocol All features from CCLayer are valid, plus the following new features: - opacity - RGB colors
Inheritance: System.Object → Cocos2D.CCNode → Cocos2D.CCLayer → Cocos2D.CCLayerRGBA
Implements: Cocos2D.ICCSelectorProtocol, Cocos2D.ICCFocusable, Cocos2D.ICCTargetedTouchDelegate, Cocos2D.ICCStandardTouchDelegate, Cocos2D.ICCTouchDelegate, Cocos2D.ICCKeypadDelegate, Cocos2D.ICCKeyboardDelegate, System.Collections.Generic.IComparer{Cocos2D.CCNode}, Cocos2D.ICCAccelerometerDelegate, Cocos2D.ICCRGBAProtocol, Cocos2D.ICCBlendProtocol
Constructors
CCLayerColor()
CCLayerColor()()
CCLayerColor(CCColor4B)
CCLayerColor(CCColor4B)(Cocos2D.CCColor4B color)
creates a CCLayer with color. Width and height are the window size.
Parameters:
color
(Cocos2D.CCColor4B)Example
CCLayerColor(CCColor4B, float, float)
CCLayerColor(CCColor4B, float, float)(Cocos2D.CCColor4B color, System.Single width, System.Single height)
creates a CCLayer with color, width and height in Points
Parameters:
color
(Cocos2D.CCColor4B)width
(System.Single)height
(System.Single)Example
Fields
Properties
BlendFunction. Conforms to CCBlendProtocol protocol
Gets or sets the color
override contentSize
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.
Methods
ChangeHeight(float)
ChangeHeight(float)(System.Single h)
change height in Points
Parameters:
h
(System.Single)Example
ChangeWidth(float)
ChangeWidth(float)(System.Single w)
change width in Points
Parameters:
w
(System.Single)Example
ChangeWidthAndHeight(float, float)
ChangeWidthAndHeight(float, float)(System.Single w, System.Single h)
change width and height in Points @since v0.8
Parameters:
w
(System.Single)h
(System.Single)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
Init()
System.Boolean Init()()
Returns:
System.Boolean
Example
InitWithColor(CCColor4B)
System.Boolean InitWithColor(CCColor4B)(Cocos2D.CCColor4B color)
initializes a CCLayer with color
Parameters:
color
(Cocos2D.CCColor4B)Returns:
System.Boolean
Example
InitWithColor(CCColor4B, float, float)
System.Boolean InitWithColor(CCColor4B, float, float)(Cocos2D.CCColor4B color, System.Single width, System.Single height)
initializes a CCLayer with color, width and height in Points
Parameters:
color
(Cocos2D.CCColor4B)width
(System.Single)height
(System.Single)Returns:
System.Boolean
Example
UpdateColor()
UpdateColor()()