Ensure proper initialization of all Arrays and Dictionaries

This commit is contained in:
Adrien Ufferte
2025-05-05 10:52:37 +02:00
parent a6c37a7f0b
commit 0bfead86e0
53 changed files with 100 additions and 101 deletions
+6 -6
View File
@@ -15,16 +15,16 @@ const TracingManager: = preload("res://sources/look_and_learn/tracing_manager.gd
@onready var grapheme_particles: GPUParticles2D = $GraphemeParticles
var gp_list: Array[Dictionary]
var gp_list: Array[Dictionary] = []
var current_video: int = 0
var videos: Array[VideoStream]
var videos: Array[VideoStream] = []
var current_image_and_sound: int = 0
var images: Array[Texture]
var sounds: Array[AudioStream]
var images: Array[Texture] = []
var sounds: Array[AudioStream] = []
static var transition_data: Dictionary
var gardens_data: Dictionary
static var transition_data: Dictionary = {}
var gardens_data: Dictionary = {}
var current_tracing: int = 0
+1 -1
View File
@@ -84,7 +84,7 @@ func _load_tracing(path: String) -> Array:
var segments: Array = []
var file: FileAccess = FileAccess.open(_real_path(path), FileAccess.READ)
while not file.eof_reached():
var points: Array[Vector2]
var points: Array[Vector2] = []
var line: PackedStringArray = file.get_csv_line()
for element: String in line:
if element == "":
+1 -1
View File
@@ -21,7 +21,7 @@ var curve_points: PackedVector2Array
var is_playing: bool = false
var is_in_demo: bool = false
var touch_positions: Array[Vector2]
var touch_positions: Array[Vector2] = []
var should_play_effects: bool = false