天天看点

cocos2d-x 3.9 init()函数

cocos2d-x 3.2版

// add the sprite as a child to this layer
bool HiHuasonScene::init()
{
this->addChild(sprite);
}
           

在3.9版本会出错,应该改成:

// add the sprite as a child to this layer

bool HiHuasonScene::init()

{

this->addChild(sprite,0);

}