2023-09-08 22:55:16 +02:00
|
|
|
extends Label
|
2023-11-12 18:20:59 +01:00
|
|
|
var previoustime
|
|
|
|
const savegame = preload("res://save.gd")
|
2023-09-08 22:55:16 +02:00
|
|
|
|
2023-11-12 18:20:59 +01:00
|
|
|
func _ready():
|
|
|
|
previoustime = int(Global.levelmax[Global.gamelevel])
|
|
|
|
if Global.time < previoustime && Global.live == 3:
|
|
|
|
Global.levelmax[Global.gamelevel] = str(Global.time)
|
|
|
|
savegame.new()
|
|
|
|
var sec = float(Global.time / 1000)
|
|
|
|
var msec = Global.time - (sec*1000)
|
|
|
|
var bsec = float(previoustime / 1000)
|
|
|
|
var bmsec = previoustime - (bsec*1000)
|
|
|
|
set_text("Your time: " + str(sec) + "." + str(msec) + "\n" + "Your best time: " + str(bsec) + "." + str(bmsec));
|