Hi guys!
I am using CCCallFunc well with this syntax:
id action1 = [CCCallFunc actionWithTarget:self selector:@selector(displayPigpens)];
which is fine for methods which do not take arguments. However, I have a method I must pass an INT to and I am having so much trouble figuring out how to do it. I have tried different things which don't seem to work such as:
id action2 = [CCCallFuncND actionWithTarget:self selector:@selector(updatePigStack:data:) data:(int *)-pigAmount];
or
id action2 = [CCCallFuncND actionWithTarget:self selector:@selector(updatePigStack:data:) data:-pigAmount];
for the record, my method declaration looks like this:
-(void)updatePigStack:(int)pigAmount {
How do I do this, any ideas?