mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
27 lines
745 B
C#
27 lines
745 B
C#
using Logger = NewHorizons.Utility.Logger;
|
|
|
|
namespace NewHorizons.OtherMods.CommonCameraUtility
|
|
{
|
|
public static class CommonCameraHandler
|
|
{
|
|
private static ICommonCameraAPI _cameraAPI;
|
|
|
|
static CommonCameraHandler()
|
|
{
|
|
_cameraAPI = Main.Instance.ModHelper.Interaction.TryGetModApi<ICommonCameraAPI>("xen.CommonCameraUtility");
|
|
}
|
|
|
|
public static void RegisterCustomCamera(OWCamera camera)
|
|
{
|
|
if (_cameraAPI != null)
|
|
{
|
|
_cameraAPI.RegisterCustomCamera(camera);
|
|
}
|
|
else
|
|
{
|
|
Logger.LogError("Tried to register custom camera but Common Camera Utility was missing.");
|
|
}
|
|
}
|
|
}
|
|
}
|