已采納回答 / wyt1996
void HelloWorld::setBackGround(const char *filename){? ? if(backImg == 0){? ? ? ? backImg=Sprite::create(filename);? ? ? ? backImg->setAnchorPoint(Point::ZERO);? ? ? ? backImg->setPosition(Point::ZERO);? ? ? ? Size mywinsize=Director::getInstance()-...
2017-04-21
已采納回答 / AllenYick
因?yàn)槟J(rèn)情況下紅包的矩形大小是【0,0,79,47】,點(diǎn)擊左下角得到的touchPoint剛好在紅包默認(rèn)的矩形中,因此會(huì)進(jìn)入下面這本if語(yǔ)句if(rect.containsPoint(touchPoint)) { state = 1; unscheduleUpdate(); redNode->setPosition(Vec2(240, 320+20)); redNode->playAnimate(); return true; }這樣就開始播放動(dòng)畫了。解決...
2016-07-07