title: coco2d-x call function with multiple arguments?
body: <p>I'm working on a cocos2d-x project and got stuck. I want to call a function, delay and than call the same function again. I'm using cocos2d-x 2.2.5. and developing for Android.</p>
  
  <p>This is what I got so far:</p>
  
  <pre><code>CCArray *arr = CCArray::create();
  arr-&gt;addObject(pSprite);
  arr-&gt;addObject(pGetal);
  
  CCFiniteTimeAction *fun1 = CCCallFuncO::create(this, callfuncO_selector(GameLayer::animateFlip), arr);
  CCDelayTime *delay = CCDelayTime::create(1.0);
  pSprite-&gt;runAction(CCSequence::create(fun1, delay, fun1, NULL));
  </code></pre>
  
  <p>The method I want to call:</p>
  
  <pre><code>void GameLayer::animateFlip(CCObject *pSObj, CCObject *pGObj){
  
     CCSprite *pSprite = (CCSprite *) pSObj;
     CCLabelTTF *pGetal = (CCLabelTTF *) pSObj;
     ...
     ...
  }
  </code></pre>
  
  <p>The function is in the same class and requires two arguments. I've tried putting both arguments (CCSprite and CCLabelTTF) in an array, but it crashes on runtime... 
  When I call the function just like this no errors occur:</p>
  
  <pre><code>this-&gt;animateFlip(sprite1, getal1);
  </code></pre>
  
  <p>Anyone any idea? </p>