new-horizons/Marshmallow/Atmosphere/MakeSunOverride.cs
Mister_Nebula dc23ac2de8 Massive rewrite
- Added moon support
- Rewrote every class for readability
- Rewrote Main class to simplify code (file planets now load on scene load)
2020-06-11 19:41:39 +01:00

26 lines
895 B
C#

using Marshmallow.External;
using OWML.ModHelper.Events;
using UnityEngine;
namespace Marshmallow.Atmosphere
{
static class MakeSunOverride
{
public static void Make(GameObject body, Sector sector, IPlanetConfig config)
{
GameObject overrideGO = new GameObject();
overrideGO.SetActive(false);
overrideGO.transform.parent = body.transform;
GiantsDeepSunOverrideVolume GDSOV = overrideGO.AddComponent<GiantsDeepSunOverrideVolume>();
GDSOV.SetValue("_sector", sector);
GDSOV.SetValue("_cloudsOuterRadius", config.TopCloudSize / 2);
GDSOV.SetValue("_cloudsInnerRadius", config.BottomCloudSize / 2);
GDSOV.SetValue("_waterOuterRadius", config.WaterSize / 2);
GDSOV.SetValue("_waterInnerRadius", 402.5f);
overrideGO.SetActive(true);
}
}
}