mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
31 lines
781 B
C#
31 lines
781 B
C#
using UnityEngine;
|
|
|
|
namespace NewHorizons.Components.EyeOfTheUniverse
|
|
{
|
|
public class QuantumInstrumentTrigger : MonoBehaviour
|
|
{
|
|
public string gatherCondition;
|
|
|
|
private QuantumInstrument _quantumInstrument;
|
|
|
|
private void Awake()
|
|
{
|
|
_quantumInstrument = GetComponent<QuantumInstrument>();
|
|
_quantumInstrument.OnFinishGather += OnFinishGather;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
_quantumInstrument.OnFinishGather -= OnFinishGather;
|
|
}
|
|
|
|
private void OnFinishGather()
|
|
{
|
|
if (!string.IsNullOrEmpty(gatherCondition))
|
|
{
|
|
DialogueConditionManager.SharedInstance.SetConditionState(gatherCondition, true);
|
|
}
|
|
}
|
|
}
|
|
}
|