new-horizons/NewHorizons/General/AmbientLightBuilder.cs
Nick J. Connors c977cb5333 Decluttered logs and added asteroid belts
Also includes some basic proc gen
2021-12-19 02:37:52 -05:00

25 lines
762 B
C#

using NewHorizons.External;
using NewHorizons.Utility;
using OWML.Utils;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.General
{
static class AmbientLightBuilder
{
public static void Make(GameObject body, float scale)
{
GameObject lightGO = GameObject.Instantiate(GameObject.Find("BrittleHollow_Body/AmbientLight_BH_Surface"), body.transform);
lightGO.transform.localPosition = Vector3.zero;
lightGO.name = "Light";
var light = lightGO.GetComponent<Light>();
light.name = "AmbientLight";
light.color = new Color(0.5f, 1f, 1f, 0.0225f);
light.range = scale;
light.intensity = 0.5f;
}
}
}