21 lines
640 B
GDScript3
21 lines
640 B
GDScript3
|
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
|