extends Node

var total_distance : float = 0.0
var total_time : int = 0
var initial_distance: float = 0.0
var initial_time: int = 0


func _ready() -> void:
	add_to_group("save_data")


func SetInitialValue(distance :float, time: int):
	initial_distance = distance
	initial_time = time


func save() -> Dictionary:
	return {
		"filename": get_scene_file_path(),
		"parent": get_parent().get_path(),
		"total_distance": initial_distance + total_distance,
		"total_time": initial_time + total_time
	}
