mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
implement music
This commit is contained in:
parent
2af8686818
commit
a8f48fcb54
@ -21,9 +21,10 @@ namespace NewHorizons.Handlers
|
|||||||
_customAudioTypes = new Dictionary<string, AudioType>();
|
_customAudioTypes = new Dictionary<string, AudioType>();
|
||||||
_audioEntries = new List<AudioLibrary.AudioEntry>();
|
_audioEntries = new List<AudioLibrary.AudioEntry>();
|
||||||
|
|
||||||
Delay.RunWhen(
|
Delay.RunWhenAndInNUpdates(
|
||||||
|
PostInit,
|
||||||
() => Locator.GetAudioManager()?._libraryAsset != null,
|
() => Locator.GetAudioManager()?._libraryAsset != null,
|
||||||
PostInit
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,9 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(config.music))
|
if (!string.IsNullOrEmpty(config.music))
|
||||||
{
|
{
|
||||||
//TODO: Implement
|
var musicSource = SearchUtilities.Find("Scene/AudioSource_Music").GetComponent<OWAudioSource>();
|
||||||
|
var audioType = AudioTypeHandler.GetAudioType(config.music, mod);
|
||||||
|
Delay.FireOnNextUpdate(() => musicSource.AssignAudioLibraryClip(audioType));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.MenuPlanet != null)
|
if (config.MenuPlanet != null)
|
||||||
|
|||||||
@ -422,6 +422,8 @@ namespace NewHorizons
|
|||||||
|
|
||||||
if (isTitleScreen && CustomTitleScreen)
|
if (isTitleScreen && CustomTitleScreen)
|
||||||
{
|
{
|
||||||
|
AudioTypeHandler.Init();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TitleSceneHandler.DisplayBodyOnTitleScreen(BodyDict.Values.ToList().SelectMany(x => x).ToList());
|
TitleSceneHandler.DisplayBodyOnTitleScreen(BodyDict.Values.ToList().SelectMany(x => x).ToList());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user