mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using UnityEngine;
|
|
|
|
namespace NewHorizons.Components
|
|
{
|
|
[UsedInUnityProject]
|
|
public class VesselOrbLocker : MonoBehaviour
|
|
{
|
|
public GameObject _coordinateInterfaceOrbObject;
|
|
private NomaiInterfaceOrb _coordinateInterfaceOrb;
|
|
|
|
public GameObject _coordinateInterfaceUpperOrbObject;
|
|
private NomaiInterfaceOrb _coordinateInterfaceUpperOrb;
|
|
|
|
public GameObject _powerOrbObject;
|
|
private NomaiInterfaceOrb _powerOrb;
|
|
|
|
private void Awake()
|
|
{
|
|
InitializeOrbs();
|
|
AddLocks();
|
|
RemoveLocks();
|
|
AddLockToWarpOrb();
|
|
}
|
|
|
|
public void InitializeOrbs()
|
|
{
|
|
_coordinateInterfaceOrb = _coordinateInterfaceOrbObject.GetComponent<NomaiInterfaceOrb>();
|
|
_coordinateInterfaceUpperOrb = _coordinateInterfaceUpperOrbObject.GetComponent<NomaiInterfaceOrb>();
|
|
_powerOrb = _powerOrbObject.GetComponent<NomaiInterfaceOrb>();
|
|
}
|
|
|
|
public void AddLocks()
|
|
{
|
|
_coordinateInterfaceOrb.AddLock();
|
|
_coordinateInterfaceUpperOrb.AddLock();
|
|
_powerOrb.AddLock();
|
|
}
|
|
|
|
public void AddLockToCoordinateOrb()
|
|
{
|
|
_coordinateInterfaceOrb.AddLock();
|
|
}
|
|
|
|
public void AddLockToWarpOrb()
|
|
{
|
|
_coordinateInterfaceUpperOrb.AddLock();
|
|
}
|
|
|
|
public void AddLockToPowerOrb()
|
|
{
|
|
_powerOrb.AddLock();
|
|
}
|
|
|
|
public void RemoveLocks()
|
|
{
|
|
_coordinateInterfaceOrb.RemoveAllLocks();
|
|
_coordinateInterfaceUpperOrb.RemoveAllLocks();
|
|
_powerOrb.RemoveAllLocks();
|
|
}
|
|
}
|
|
}
|