cocos2d-x action执行完毕的回调

cocos2d-x action执行完毕的回调

MySprite::createOne()

{

....

//  MUST add to sheet firstly
        spriteSheet->addChild(sprite);

        // create action
        auto createAction = MoveTo::create(3.0f, Point(pos.x, pos.y));

        auto sequence = Sequence::create(createAction,
            CallFuncN::create(CC_CALLBACK_1(MySprite::onAfterCreateAction, sprite)), 0);

        sprite->runAction(sequence);

}

MySprite::onAfterCreateAction(Node * pSender)

{

MySprite * pThis = (MySprite *) pSender;

....

}

上一篇:关于JQuery全选/反选第二次失效的问题


下一篇:jQuery全选反选插件