Load menu and level audio dynamically
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user