Narendrabrsoft / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

onSchedule with interval doesn't work #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

private long waitSec = 2;
...
in onEnter method of a CCLayer:
schedule(nextCallback, waitSec);
...

private UpdateCallback nextCallback = new UpdateCallback() {

            @Override
            public void update(float d) {       
                doSomething()
                }
            }
        };

What is the expected output? What do you see instead?
Expected: nextCallBack called only after 2 seconds.
Instead: nextCallBack called very quickly.

Had to calculate mySelf elapsed time with System.currentTimeMillis() which is 
not big deal but i'd rather prefer base my code on library.

Thank you.

Original issue reported on code.google.com by vcarl...@gmail.com on 16 Feb 2011 at 11:18

GoogleCodeExporter commented 8 years ago
fixed

Original comment by opengen...@gmail.com on 18 Feb 2011 at 12:23

GoogleCodeExporter commented 8 years ago

Original comment by opengen...@gmail.com on 27 Mar 2011 at 10:54