2024-06-18 19:17:42 +02:00
|
|
|
extends Node
|
|
|
|
|
2024-06-18 18:58:47 +02:00
|
|
|
# Variable to store the path from which JSON data is loaded
|
2024-06-18 19:17:42 +02:00
|
|
|
var loadPath
|
2024-06-18 18:58:47 +02:00
|
|
|
|
|
|
|
# Variable to store the loaded JSON data
|
2024-06-18 19:17:42 +02:00
|
|
|
var data
|
|
|
|
|
2024-06-18 18:58:47 +02:00
|
|
|
# Called when the node is added to the scene
|
2024-06-18 19:17:42 +02:00
|
|
|
func _ready():
|
2024-06-18 18:58:47 +02:00
|
|
|
loadPath = "res://content/stats.json" # Set the path to load JSON data from
|
|
|
|
data = Load.loadJSON(loadPath) # Load JSON data from the specified path
|