mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Scale
This commit is contained in:
parent
ab45daaf5c
commit
7dfda24e36
@ -130,13 +130,15 @@ namespace NewHorizons.Builder.Body
|
||||
supernovaEffectController._shockLayerTrailFlare = 100;
|
||||
supernovaEffectController._shockLayerTrailLength = biggestSize < 600 ? 300 : 600;
|
||||
|
||||
var scale = config.ShockEffect != null ? config.ShockEffect.scale : 1.1f;
|
||||
|
||||
shockLayer.transform.position = planetGO.transform.position;
|
||||
shockLayer.transform.localScale = Vector3.one * biggestSize * 1.1f;
|
||||
shockLayer.transform.localScale = Vector3.one * biggestSize * scale;
|
||||
|
||||
if (!noMeshChange && procGen != null)
|
||||
{
|
||||
shockLayer.GetComponent<MeshFilter>().sharedMesh = procGen.GetComponent<MeshFilter>().sharedMesh;
|
||||
shockLayer.transform.localScale = Vector3.one * 1.1f;
|
||||
shockLayer.transform.localScale = Vector3.one * scale;
|
||||
shockLayer.transform.rotation = Quaternion.Euler(90, 0, 0);
|
||||
}
|
||||
|
||||
@ -148,7 +150,7 @@ namespace NewHorizons.Builder.Body
|
||||
if (mesh != null)
|
||||
{
|
||||
shockLayer.GetComponent<MeshFilter>().sharedMesh = mesh;
|
||||
shockLayer.transform.localScale = Vector3.one * 1.1f;
|
||||
shockLayer.transform.localScale = Vector3.one * scale;
|
||||
shockLayer.transform.rotation = Quaternion.Euler(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -13,7 +14,12 @@ namespace NewHorizons.External.Modules
|
||||
/// <summary>
|
||||
/// Does this planet have a shock effect when the nearest star goes supernova? Automatically disabled for stars, focal points, and stellar remnants.
|
||||
/// </summary>
|
||||
public bool hasSupernovaShockEffect = true;
|
||||
[DefaultValue(true)] public bool hasSupernovaShockEffect = true;
|
||||
|
||||
/// <summary>
|
||||
/// Scale of the shock effect mesh
|
||||
/// </summary>
|
||||
[DefaultValue(1.1f)] public float scale = 1.1f;
|
||||
|
||||
/// <summary>
|
||||
/// Asset Bundle that contains the shock effect mesh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user