Hello there, i got a problem with making a countdown timer. the timer just wont show when i run it.
here's the code:
Its all in world class. Do I need to make the timer as an actor? or tweaking the method prepare?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | private int time; public Play() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super ( 950 , 550 , 1 ); time = 6000 ; point = 0 ; prepare(); } private void countTime() { time--; showTime(); } private void showTime() { showText( "Time: " + time/ 100 , 50 , 50 ); } |