CCSprite* pSprite = CCSprite::spriteWithFile(“HelloWorld.png”,CCRect(0,0,50,50));
// position the sprite on the center of the screen
pSprite~~>setPosition);
pSprite~~>setAnchorPoint(ccp(0,0));
This is the demo’s code~but the log shows that the pSprite is null.and the picture is in the “assets” folder
this is the error info
- pSprite 0x00000000 {m_nOpacity=? m_sColor={r=? g=? b=? } m_pobTextureAtlas=??? …} cocos2d::CCSprite *