Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17071

How to call a void function inside the sequence?

$
0
0

@nightrobin wrote:

Good day,

I have this:

void TheClass:Method1()
{
    cocos2d::MoveBy* moveAction = cocos2d::MoveBy::create( 3, cocos2d::Vec2( 0, 10 ) );
    cocos2d::Sequence* theSequence = cocos2d::Sequence::create(moveAction, TheClass:Method2, nullptr);
    someSprite->runAction(theSequence);
}
void TheClass:Method2()
{
    // run some code
}

Why can't I run this?

I am using coco2d-x ver 3.8.

Thank you smile

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 17071

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>