求助 添加精灵时出现的问题

bool GameScene::init(){ ////////////////////////////// // 1. super init first if (!Layer::init()) { return false; }
 Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director::getInstance()->getVisibleOrigin(); auto bg = Sprite::create("tex/bg.jpg"); //bg->setPosition(bg->getContentSize().width,bg->getContentSize().height);//直接设置为屏幕的1/2 bg->setAnchorPoint(Vec2(0, 0));//利用锚点 this->addChild(bg); hero->Hero::create(); hero->setPosition(121,200); this->addChild(hero);
 this->schedule(schedule_selector(GameScene::update), 0.01);//每秒刷新100次,可以从fps中看出 //scheduleUpdate();//直接调用update方法 return true;}

无法读取内存,_textureAtlas,_batchnode等等 都无法读取

图片上传不了0.0

你这代码贴的好难看

你确定需要加上相对路径?