mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Moved an if statement to a more appropriate place
This commit is contained in:
parent
e94aced834
commit
29f1c4ab8c
@ -129,11 +129,6 @@ namespace NewHorizons.Components
|
|||||||
LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack);
|
LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack);
|
||||||
break;
|
break;
|
||||||
case NHCreditsType.Custom:
|
case NHCreditsType.Custom:
|
||||||
// We can't load in custom music if an IModBehaviour cannot be provided. This should only happen if called via TryHijackDeathSequence().
|
|
||||||
if (mod is null)
|
|
||||||
{
|
|
||||||
NHLogger.LogWarning("Credits called using TryHijackDeathSequence(), custom credits audio cannot not be loaded.");
|
|
||||||
}
|
|
||||||
LoadCustomCreditsScene(gameOver, mod);
|
LoadCustomCreditsScene(gameOver, mod);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -165,6 +160,11 @@ namespace NewHorizons.Components
|
|||||||
{
|
{
|
||||||
AudioUtilities.SetAudioClip(musicSource, gameOver.audio, mod);
|
AudioUtilities.SetAudioClip(musicSource, gameOver.audio, mod);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We can't load in custom music if an IModBehaviour cannot be provided. This should only happen if called via TryHijackDeathSequence().
|
||||||
|
NHLogger.LogWarning("Credits called using TryHijackDeathSequence(), custom credits audio cannot not be loaded.");
|
||||||
|
}
|
||||||
musicSource.SetMaxVolume(gameOver.audioVolume);
|
musicSource.SetMaxVolume(gameOver.audioVolume);
|
||||||
musicSource.loop = gameOver.audioLooping;
|
musicSource.loop = gameOver.audioLooping;
|
||||||
musicSource.FadeIn(gameOver.audioFadeInLength);
|
musicSource.FadeIn(gameOver.audioFadeInLength);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user