Terachor/tracks/exampleautoload.gd

21 lines
640 B
GDScript3
Raw Normal View History

2024-08-27 22:35:42 +00:00
extends BaseTrack
# This is the same as example but uses the autoload system to automatically populate names from file names
# Gets the area that should become the name from regex
# You can use sites like this to help construct regex: https://regex101.com/
func _init():
_default = {
"artist": "Kevin MacLeod",
"thumbnail": preload("res://thumbnails/example.bmp"),
"source": "https://incompetech.com/",
"disabled": false
}
_autoload = {
"path": "res://music/example",
"pattern": "^[^.]+"
}
# You can still override things using a _tracks variable and the track set to the path to the file for what you want to override