Two types of CCCallFunc action

The CCCallFunc Action allows you to call a method from an action. Can be useful at the end of a sequence action.

There are two variations of CCCallFunc. They are CCCallFuncN and CCCallFuncND.

CCCallFuncN takes the node as an argument, and CCCallFuncND takes the node and a pointer to some data.

id actionCallFuncN = [CCCallFuncN actionWithTarget:self selector:@selector(doATaskN:)];

id actionCallFuncND = [CCCallFuncND actionWithTarget:self selector:@selector(doATaskND:data:) data:pointerToSomeData];

- (void) doATaskN: (id)node
{
//Your code goes here...
}

- (void) doATaskND: (id)node data:(void*)d
{
//Your code goes here...
}

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>