Load menu and level audio dynamically

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-15 14:54:57 +01:00
parent 6eb903cbaa
commit a75ade8b33
8 changed files with 67 additions and 6 deletions

View File

@@ -69,11 +69,15 @@ class _WolfRendererState extends State<WolfRenderer>
// Grab the specific level from the singleton
_currentLevel = Wolf3d.I.levels[mapIndex];
// Play the exact track id Software intended for this level!
Wolf3d.I.audio.playLevelMusic(_currentLevel);
// TODO: Initialize player position, spawn enemies based on difficulty, etc.
debugPrint("Loaded Level: ${_currentLevel.name}");
}
void _onLevelCompleted() {
Wolf3d.I.audio.stopMusic();
// When the player hits the elevator switch, advance the map
setState(() {
_currentMapIndex++;