aboutsummaryrefslogtreecommitdiff
path: root/game/src/MusicConductor/SongInfo.gd
diff options
context:
space:
mode:
author ClarkeCode <33846391+ClarkeCode@users.noreply.github.com>2023-03-06 22:14:19 +0100
committer GitHub <noreply@github.com>2023-03-06 22:14:19 +0100
commitce325c16c0f5d82ed51abd8bd13928a7bc609ba5 (patch)
tree9684123684de590ecd3be99be034d68f4bc6f8b7 /game/src/MusicConductor/SongInfo.gd
parent95173891f7c5eea7717a58ae4f1438fd09e0ee1f (diff)
Add Music Player (#49)
* Adding MusicConductor * Added selectable songs and player visibility toggle * Refinements to the music system * SongInfo compatability with various audio formats * Moved UI reqs to editor description; flipped conditions to exclude music .import files * Made selection of the first music track extension-agnostic * Fixed visual bug with play/pause button when interacting with progress slider
Diffstat (limited to 'game/src/MusicConductor/SongInfo.gd')
-rw-r--r--game/src/MusicConductor/SongInfo.gd11
1 files changed, 11 insertions, 0 deletions
diff --git a/game/src/MusicConductor/SongInfo.gd b/game/src/MusicConductor/SongInfo.gd
new file mode 100644
index 0000000..85ef96a
--- /dev/null
+++ b/game/src/MusicConductor/SongInfo.gd
@@ -0,0 +1,11 @@
+extends Node
+class_name SongInfo
+
+var fullyQualifiedPath : String = ""
+var readableName : String = ""
+var loadedStream : Resource
+
+func _init(dirname:String, fname:String):
+ fullyQualifiedPath = dirname + fname
+ readableName = fname.get_basename().replace("_", " ")
+ loadedStream = load(fullyQualifiedPath)