level select and save improvments
- level select starts on the stage you just came from - default time from save file is INF, so any actual time will get saved - INF renders as "-:--:--" to indicate a time has not been set
This commit is contained in:
parent
12825c3e61
commit
076a91b43b
3 changed files with 8 additions and 6 deletions
8
game.gd
8
game.gd
|
@ -100,11 +100,13 @@ func save():
|
|||
|
||||
#Convert seconds into M:SS:MS
|
||||
func timeify(input):
|
||||
var minutes = str(floor(input / 60))
|
||||
var seconds = floor(fmod(input,60))
|
||||
var milliseconds := floor(fmod(input, 1) * 100)
|
||||
if input < 600:
|
||||
var minutes = str(floor(input / 60))
|
||||
var seconds = floor(fmod(input,60))
|
||||
var milliseconds := floor(fmod(input, 1) * 100)
|
||||
return minutes + ":" + ("%02d" % seconds) + ":" + ("%02d" % milliseconds)
|
||||
elif input == INF:
|
||||
return "-:--:--"
|
||||
else:
|
||||
return "9:59:99"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue