Terachor/tracks/base.gd

22 lines
316 B
GDScript3
Raw Normal View History

2024-08-27 21:11:45 +00:00
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