Android: Time Loop in milliseconds -


this game similar 1 of try survive long possible, hell-shooter games.

so wish record amount of time user can survive after pressing "start". similarly, continue update frames @ time. thinking using handler or timer or animation updating frames (the activity) , mathematically manipulating simpledateformat. however, i'm not sure how 1 go it.

as start, have of fruitninja survival mode, though smaller times recorded too.

thanks!

you can use timer or thread handler

   timer = new timer();         timer.schedule(new timertask() {             @override             public void run() {                 own code                 ///////schedule timer, after first 100ms timertask run every 1000ms             }         }, 1000, 1000); 

can use handler

  handler handler = new handler();         handler.postdelayed(             new runnable() {                 public void run() {                     afficher();                 }             }, 1000l); 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -