cocos3 抛物线调用

    auto sp=Sprite::create("hero.png");
    sp->setPosition(visibleSize.width/2,visibleSize.height/2);
    addChild(sp);


    auto pa=Parabola::create(1,sp->getPosition(),5,60,10);
    auto sq=Sequence::create(
        pa,
        CallFunc::create(CC_CALLBACK_0(Sprite::removeFromParent, sp)),
        NULL
    );
    sp->runAction(sq);

 

posted @ 2014-12-16 13:47  yufenghou  阅读(201)  评论(0编辑  收藏  举报