-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |