new-horizons/NewHorizons/Components/ChangeStarSystemVolume.cs
JohnCorby 656ff16305 Revert "Reformat"
This reverts commit 7c0ba5597720f963432d8379a236e74f3508d077.
2022-05-22 18:41:34 -07:00

24 lines
757 B
C#

namespace NewHorizons.Components
{
public class ChangeStarSystemVolume : BlackHoleDestructionVolume
{
public string TargetSolarSystem { get; set; }
public override void Awake()
{
base.Awake();
_deathType = DeathType.Meditation;
}
public override void VanishShip(OWRigidbody shipBody, RelativeLocationData entryLocation)
{
if (PlayerState.IsInsideShip()) Main.Instance.ChangeCurrentStarSystem(TargetSolarSystem, true);
}
public override void VanishPlayer(OWRigidbody playerBody, RelativeLocationData entryLocation)
{
Main.Instance.ChangeCurrentStarSystem(TargetSolarSystem, PlayerState.AtFlightConsole());
}
}
}