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