diff --git a/Loading.gd b/Loading.gd new file mode 100644 index 0000000..ae9c1ef --- /dev/null +++ b/Loading.gd @@ -0,0 +1,26 @@ +extends Node + +var images_to_load: Array = [] + +func _ready(): + var file_handler = FileAccess.open("/home/rafal/Projekty/Rust/Rozne/images.txt", FileAccess.READ) + images_to_load = file_handler.get_as_text().split('\n') + + var line_index : int = 0 + var all_lines: int = images_to_load.size() + + print("Loading " + (images_to_load.size()) + " images") + # Image +# for i in images_to_load: +# line_index += 1 +# print("Loading line " + str(line_index) +"/"+str(all_lines)+ " --- " + i) +# Image.load_from_file(i) + + # Load normal + for i in images_to_load: + line_index += 1 + print("Loading line " + str(line_index) +"/"+str(all_lines)+ " --- " + i) + load(i) + + print("==================================================== ENDING =======================================") + get_tree().quit() diff --git a/Loading.tscn b/Loading.tscn new file mode 100644 index 0000000..38bb712 --- /dev/null +++ b/Loading.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://by8g1jwhspswr"] + +[ext_resource type="Script" path="res://Loading.gd" id="1_nyewk"] + +[node name="Loading" type="Node"] +script = ExtResource("1_nyewk")