objective c - CCProgressTimer doesn't update, then suddenly jumps -


i have following code:

ccprogresstimer *atimer;   -(void) generatedungeon {      srand (time(null));     [self initdungeonarray];      int numrooms = rndm(10,100);     (int a=0; a< numrooms; a++) {          [self makerandomroom];          atimer.percentage += 100/numrooms;     }  [self connecttherooms]; [self placestairs]; } 

the problem during loop timer not updated on screen, (after loop finishes think) fills full. don't understand why happening. thought when change percentage, image update.

can me understand should understanding?

thanks.

your image(in case, progress timer), updates on screen in draw() , visit() methods. called every tick. here change it's value in 1 tick. during previous drawing timer value 0 percent, , on next drawing it's value 100

you make in single thread. timer not update in case. create updatable timer, can try move long working code separate thread. able update timer.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -