定时器在Eclipse为Android游戏 [英] Timer in Eclipse for Android Game

查看:168
本文介绍了定时器在Eclipse为Android游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做我这个安卓游戏为我们规划3个疗程。而且我没有任何想法,我怎么能做出一个计时器,将不会停止,直到用户完成了所有3个级别的比赛?请帮我:(

I'm making this android game of mine for our Programming 3 course. And I don't have any idea how can I make a timer that will not stop until the user finished all the 3 levels of the game? Please help me :(

推荐答案

您可以开始在服务的时间。所以它将继续在anythings的背景irresoective运行。在完成3级后,您可以通过停止服务停止计时器。

You can start the time in a service. So it will continue to run in the background irresoective of anythings. After completing 3 levels you can stop the timer by stopping the service.

这篇关于定时器在Eclipse为Android游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆