CCLayerColor 及 CCLayerGradient
一、CCLayerColor
code
CCLayerColor::initWithColor( ccc4( 255, 0, 0, 100 ) );
//CCLayerColor::initWithColor( ccc4( 255, 0, 0, 100 ), 100, 100 );
//ignoreAnchorPointForPosition( false );
二、CCLayerGradient
code
class LayerGradient :public CCLayerGradient
{
public:
CREATE_FUNC( LayerGradient );
bool init( )
{
//CCLayerGradient::initWithColor( ccc4( 255, 0, 0, 255 ), ccc4( 0, 0, 255, 255 ) );
CCLayerGradient::initWithColor( ccc4( 255, 0, 0, 255 ), ccc4( 0, 0, 255, 255 ), ccp( 1, 0 ) );//横坚变了
return true;
}
};
时间: 2024-08-05 06:30:28