J2ME 2D Small Game entry (vi) Timers and rewards and punishments and evaluations
Source: Internet
Author: User
Evaluation six, timer and rewards and punishments and evaluation
It's time for us to join our timer, and I'm going to start timing from the beginning of the game and keep updating to the screen, and the timer stops working after the game is over.
First, the current moment is recorded at the time of initialization:
gametime=0;
Gametimeoffset=system.currenttimemillis ();
In the future, as long as the game does not gameover in each update cycle are calculated:
Want to be in the small screen of mobile phone so that things are very difficult, in fact, this is my mobile phone to play the game is not interested, but I am full of confidence in mobile phone network applications.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.