How to use CallFuncND in cocos2d for android -
i want call method thrice different parameters , need have delay between calling them,inorder want use cccallfuncnd
,but unable implement in code, please me giving simple example of how call cccallfuncnd
.
my code :
this.runaction(cccallfuncnd.action(this, "shift_sec", "1")); public void shift_sec(string v) { system.out.println("coming method. : "+v); }
i illustrate example:
cccallfuncnd.action(this, "hitcallback", data)
here
this--> target i.e sender
"hitcallback"-------> string being called.
data -----------> object send
public void hitcallback(object sender,object data){ ccsprite hitspotsprite = (ccsprite)data; hitspotsprite.removefromparentandcleanup(true); hitspotsprite = null; }
in case shift_sec(string v){}
being modified
shift_sec(object sender,object data){}
Comments
Post a Comment