Hi all together,
in my game I want to display a count down timer. It counts from 30.0s down to 0.0s
The deciseconds always must be displayed but what I'm getting is a missing ".0" at
30, 29, 28, ... 3, 2, 1 and 0 seconds - so it looks like:
30
29.9
29.8
29.7
29.6
29.5
29.4
29.3
29.2
29.1
29
28.9
29.8
...
Every tick I calculate the variable gTimeLeft to display how much time is left.
- using round(gTimeLeft*10)/10 cuts off the required ".0"
- zeropad() is only usefull for adding leading zeros, but I need a trailing zero including the decimal point
So how can I format my timer like "ss.s" without slowing down the frame rate?
Thanks for hints and/or solutions in advance.