new-horizons/NewHorizons/Components/Volumes/BlackHoleDestructionVolume.cs

25 lines
693 B
C#

using NewHorizons.OtherMods.AchievementsPlus.NH;
namespace NewHorizons.Components.Volumes
{
public class BlackHoleDestructionVolume : DestructionVolume
{
public override void Awake()
{
base.Awake();
_deathType = DeathType.BlackHole;
}
public override void VanishProbe(OWRigidbody probeBody, RelativeLocationData entryLocation)
{
SurveyorProbe requiredComponent = probeBody.GetRequiredComponent<SurveyorProbe>();
if (requiredComponent.IsLaunched())
{
Destroy(requiredComponent.gameObject);
ProbeLostAchievement.Earn();
}
}
}
}