Open GoogleCodeExporter opened 8 years ago
ok, I found a solution.
You can define the method like this:
(if the method do the same thing)
public void myMethod(float dt){
//the thing I wanna do
}
public void myMethod(Object sender){
this.myMethod(0.0f);
}
Original comment by walkerD...@gmail.com
on 26 Mar 2011 at 7:56
ok, I found a solution.
You can define the method like this:
(if the method do the same thing)
public void myMethod(float dt){
//the thing I wanna do
}
public void myMethod(Object sender){
this.myMethod(0.0f);
}
Original comment by walkerD...@gmail.com
on 26 Mar 2011 at 7:56
Hi,
I tried your solution, but I have a problem: I have two method like you. First
is CCCallFuncN.action(this,"myMethod") and second is scheduled method like your
method.
When I start application and press on object first method call second method
and application crash down.
Here is an error code:
04-20 15:38:05.256: ERROR/AndroidRuntime(258): Uncaught handler: thread
GLThread 8 exiting due to uncaught exception
04-20 15:38:05.356: ERROR/AndroidRuntime(258):
java.lang.IndexOutOfBoundsException
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
java.util.ArrayList.remove(ArrayList.java:507)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
org.cocos2d.actions.CCActionManager.removeAction(CCActionManager.java:102)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
org.cocos2d.actions.CCActionManager.update(CCActionManager.java:314)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
org.cocos2d.actions.CCScheduler.tick(CCScheduler.java:192)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
org.cocos2d.nodes.CCDirector.drawCCScene(CCDirector.java:692)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:663)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1127)
04-20 15:38:05.356: ERROR/AndroidRuntime(258): at
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:975)
Can you help me ? Thanks
Original comment by hajek.mi...@gmail.com
on 20 Apr 2011 at 1:42
Hi,
new version of cocos fixed this problem Thanks :)
Original comment by hajek.mi...@gmail.com
on 22 Apr 2011 at 6:40
Original issue reported on code.google.com by
walkerD...@gmail.com
on 26 Mar 2011 at 7:29