本文整理汇总了C++中MovieClip::getFrameList方法的典型用法代码示例。如果您正苦于以下问题:C++ MovieClip::getFrameList方法的具体用法?C++ MovieClip::getFrameList怎么用?C++ MovieClip::getFrameList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MovieClip
的用法示例。
在下文中一共展示了MovieClip::getFrameList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clock
MovieClipTest::MovieClipTest()
{
CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, 0, true);
clock_t time;
time = clock();
MovieClip* mc = NULL;
CCArray* frameList = NULL;
this->curTag = 0;
for (int i = 0; i < 1; ++i)
{
if (!mc)
{
mc = MovieClip::create("spider", ".pvr.ccz");
frameList = mc->getFrameList();
mc->addEventListener(this, complete_selector(MovieClipTest::playComplete));
}
else
{
//mc = MovieClip::create("spider", ".pvr.ccz");
mc = MovieClip::create(frameList);
}
mc->setPosition(ccp(ScreenUtil::getLeft() + 20 + (i * 120), ScreenUtil::getCenter().y));
mc->play(.03f, true, true);
this->addChild(mc);
mc->setTag(i);
}
CCLOG("view time : %d ms", clock() - time);
CCSprite* sp = CCSprite::create("node.png");
this->addChild(sp);
CCSprite* sp1 = CCSprite::create("node.png");
this->addChild(sp1);
sp1->setPosition(ccp(180, 126.65));
CCSprite* sp2 = CCSprite::create("node.png");
this->addChild(sp2);
sp2->setPosition(ccp(293.05, 271.75));
CCSprite* sp3 = CCSprite::create("node.png");
this->addChild(sp3);
sp3->setPosition(ccp(150.45, 54.5));
CCSprite* sp4 = CCSprite::create("node.png");
this->addChild(sp4);
sp4->setPosition(ccp(150.45, 167.5));
vector<float> vect;
MathUtil::segmentsIntr(sp1->getPosition(), sp2->getPosition(), ccp(150.45, 54.5), ccp(150.45, 167.5), vect);
CCLOG("%d", vect.size());
sp->setOpacity(0xCC);
if (vect.size() > 0)
{
sp->setPositionX(vect.at(0));
sp->setPositionY(vect.at(1));
}
CCSprite* spt = CCSprite::create("effect/a1.png");
CCSprite* mask = CCSprite::create("normal_body.png");
CCSprite* maskMc;// = MaskUtil::createMaskedSprite(spt, mask, true);
//maskMc->setPosition(ccp(200, 200));
//this->addChild(maskMc);
maskMc = MaskUtil::createMaskedSprite(mc, mask);
maskMc->setPosition(ccp(500, 200));
this->addChild(maskMc);
}