regression-test-project/Autoload/Autoload.gd

24 lines
483 B
GDScript3
Raw Normal View History

2020-08-05 11:03:11 +02:00
extends Node
2020-11-06 16:57:49 +01:00
const screen_size = Vector2(1024, 600)
const RANGE: int = 5
var time_to_show: float = -1000.0
2020-08-05 11:03:11 +02:00
2020-08-16 08:12:17 +02:00
func _init():
2020-08-05 11:03:11 +02:00
for argument in OS.get_cmdline_args():
2020-11-06 16:57:49 +01:00
var rr: String = argument
if rr.find("tscn") != -1: # Ignore all tscn scenes/names
2020-08-05 11:03:11 +02:00
continue
time_to_show = argument.to_float()
print("Time set to: " + str(time_to_show))
break
2020-11-06 16:57:49 +01:00
func _process(delta: float) -> void:
2020-08-05 11:03:11 +02:00
time_to_show -= delta
if time_to_show < 0 && time_to_show > -500:
get_tree().quit()