mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
add an event
This commit is contained in:
parent
c493db6883
commit
cfaa0dc55a
@ -91,6 +91,15 @@ namespace NewHorizons.Handlers
|
|||||||
// default to displaying nh planets if no title screen builders
|
// default to displaying nh planets if no title screen builders
|
||||||
else
|
else
|
||||||
DisplayBodiesOnTitleScreen();
|
DisplayBodiesOnTitleScreen();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Main.Instance.OnTitleScreenLoaded?.Invoke();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
NHLogger.LogError($"Error in event handler for OnTitleScreenLoaded: {e}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void InitSubtitles()
|
public static void InitSubtitles()
|
||||||
|
|||||||
@ -73,6 +73,11 @@ namespace NewHorizons
|
|||||||
/// Gives the name of the planet that was just loaded.
|
/// Gives the name of the planet that was just loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UnityEvent<string> GetBodyLoadedEvent();
|
UnityEvent<string> GetBodyLoadedEvent();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An event invoked when NH has finished building the title screen.
|
||||||
|
/// </summary>
|
||||||
|
UnityEvent GetTitleScreenLoadedEvent();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Querying configs
|
#region Querying configs
|
||||||
|
|||||||
@ -111,6 +111,7 @@ namespace NewHorizons
|
|||||||
public StarSystemEvent OnChangeStarSystem = new();
|
public StarSystemEvent OnChangeStarSystem = new();
|
||||||
public StarSystemEvent OnStarSystemLoaded = new();
|
public StarSystemEvent OnStarSystemLoaded = new();
|
||||||
public StarSystemEvent OnPlanetLoaded = new();
|
public StarSystemEvent OnPlanetLoaded = new();
|
||||||
|
public UnityEvent OnTitleScreenLoaded = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Depending on platform, the AsyncOwnershipStatus might not be ready by the time we go to check it.
|
/// Depending on platform, the AsyncOwnershipStatus might not be ready by the time we go to check it.
|
||||||
|
|||||||
@ -90,6 +90,7 @@ namespace NewHorizons
|
|||||||
public UnityEvent<string> GetChangeStarSystemEvent() => Main.Instance.OnChangeStarSystem;
|
public UnityEvent<string> GetChangeStarSystemEvent() => Main.Instance.OnChangeStarSystem;
|
||||||
public UnityEvent<string> GetStarSystemLoadedEvent() => Main.Instance.OnStarSystemLoaded;
|
public UnityEvent<string> GetStarSystemLoadedEvent() => Main.Instance.OnStarSystemLoaded;
|
||||||
public UnityEvent<string> GetBodyLoadedEvent() => Main.Instance.OnPlanetLoaded;
|
public UnityEvent<string> GetBodyLoadedEvent() => Main.Instance.OnPlanetLoaded;
|
||||||
|
public UnityEvent GetTitleScreenLoadedEvent() => Main.Instance.OnTitleScreenLoaded;
|
||||||
|
|
||||||
public bool SetDefaultSystem(string name)
|
public bool SetDefaultSystem(string name)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user