22 lines
316 B
GDScript3
22 lines
316 B
GDScript3
|
extends Node
|
||
|
class_name BaseTrack
|
||
|
|
||
|
var _default = null
|
||
|
var _tracks = null
|
||
|
|
||
|
func get_tracks():
|
||
|
if not _tracks:
|
||
|
return []
|
||
|
|
||
|
var tracks = _tracks.duplicate()
|
||
|
|
||
|
if not _default:
|
||
|
return tracks
|
||
|
|
||
|
for track in tracks:
|
||
|
for key in _default:
|
||
|
if not track.has(key):
|
||
|
track[key] = _default[key]
|
||
|
|
||
|
return tracks
|