已采纳回答 / 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
因为默认情况下红包的矩形大小是【0,0,79,47】,点击左下角得到的touchPoint刚好在红包默认的矩形中,因此会进入下面这本if语句if(rect.containsPoint(touchPoint)) { state = 1; unscheduleUpdate(); redNode->setPosition(Vec2(240, 320+20)); redNode->playAnimate(); return true; }这样就开始播放动画了。解决...
2016-07-07