Hi I am developing game based on timing, What I want is my game will be of 100 seconds and time will be decreased every second, in between suppose user completed game in 40 seconds then the remaining seconds will be added to the score at that time also time will decrease but it needs to be decrease 1 in 10 mills seconds.
I searched on Google and I found the following code,
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
}
public void onFinish() {
mTextField.setText("done!");
}
}.start();
Using this code decreasing 1 in every second, how can I decrease 1 in 10 millisecond?
for reference you can check This game
Change 2nd param for that.
new CountDownTimer(30000, 1000)
for example, speed of 25 frames per second is 40 milliseconds (it's 1s/25frames). It is enough for any your requirements.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments