【发布时间】:2017-05-03 18:15:54
【问题描述】:
更新 Cocos2dx 和 Xcode 后,我开始收到错误:Thread1:EXC_BAD_ACCESS (code=1, address=0x0)。当我设置位置时会发生这种情况,但我认为它与 png 图像有关:
auto backgroundSprite=Sprite::create("thing.png");
backgroundSprite->setPosition(Vec2(visibleSize.width /2 +origin.x,visibleSize.height / 2 + origin.y));
我尝试将此代码和图像添加到不同的项目中,并且效果很好。我也尝试将图像文件切换到其他文件,但没有成功。
【问题讨论】: