mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make it so planets must fall farther into stars to be destroyed
This commit is contained in:
parent
b0bc48465c
commit
0083e485b3
@ -73,10 +73,18 @@ namespace NewHorizons.Builder.Body
|
|||||||
deathVolume.transform.localPosition = Vector3.zero;
|
deathVolume.transform.localPosition = Vector3.zero;
|
||||||
deathVolume.transform.localScale = Vector3.one;
|
deathVolume.transform.localScale = Vector3.one;
|
||||||
deathVolume.GetComponent<SphereCollider>().radius = 1f;
|
deathVolume.GetComponent<SphereCollider>().radius = 1f;
|
||||||
deathVolume.GetComponent<DestructionVolume>()._onlyAffectsPlayerAndShip = false;
|
deathVolume.GetComponent<DestructionVolume>()._onlyAffectsPlayerAndShip = true;
|
||||||
deathVolume.GetComponent<DestructionVolume>()._shrinkBodies = true;
|
deathVolume.GetComponent<DestructionVolume>()._shrinkBodies = true;
|
||||||
deathVolume.name = "DestructionVolume";
|
deathVolume.name = "DestructionVolume";
|
||||||
|
|
||||||
|
var planetDestructionVolume = Object.Instantiate(deathVolume, starGO.transform);
|
||||||
|
planetDestructionVolume.transform.localPosition = Vector3.zero;
|
||||||
|
planetDestructionVolume.transform.localScale = Vector3.one;
|
||||||
|
planetDestructionVolume.GetComponent<SphereCollider>().radius = 0.75f;
|
||||||
|
planetDestructionVolume.GetComponent<DestructionVolume>()._onlyAffectsPlayerAndShip = false;
|
||||||
|
planetDestructionVolume.GetComponent<DestructionVolume>()._shrinkBodies = true;
|
||||||
|
planetDestructionVolume.name = "PlanetDestructionVolume";
|
||||||
|
|
||||||
Light ambientLight = ambientLightGO.GetComponent<Light>();
|
Light ambientLight = ambientLightGO.GetComponent<Light>();
|
||||||
|
|
||||||
var sunLight = new GameObject("StarLight");
|
var sunLight = new GameObject("StarLight");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user