bool GameOverLayer::init()
{
if (CCLayerColor::initWithColor(ccc4(255, 255, 255, 255))) {
return true;
}
else
{
return false;
}
}
initWithColor 函数不是静态函数,为什么我可以用 cclayercolor 调用它?
define initWithColor function as below code :
bool CCLayerColor::initWithColor(const ccColor4B& color)
{
CCSize s = CCDirector::sharedDirector()->getWinSize();
this->initWithColor(color, s.width, s.height);
return true;
}