bool GameOverLayer::init()
{
if (CCLayerColor::initWithColor(ccc4(255, 255, 255, 255))) {
return true;
}
else
{
return false;
}
}
函数initWithCoder不是静态函数,为什么我可以用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;
}