r3-next/backgounds/Label3.gd

16 lines
551 B
GDScript3
Raw Normal View History

2023-09-08 22:55:16 +02:00
extends Label
2023-11-12 18:20:59 +01:00
var previoustime
2024-10-29 22:37:39 +01:00
var savegame = load("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)
2024-01-16 13:58:51 +01:00
if !Global.debug:
savegame.new()
2023-11-12 18:20:59 +01:00
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));