From 3317221f5844c04ec76d82e8022f8f6af43bba9a Mon Sep 17 00:00:00 2001 From: Joshua Thome Date: Sat, 5 Oct 2024 01:29:25 -0500 Subject: [PATCH] Remove ambient light code --- .../Builder/General/AmbientLightBuilder.cs | 2 -- NewHorizons/Components/AmbientLight.cs | 27 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 NewHorizons/Components/AmbientLight.cs diff --git a/NewHorizons/Builder/General/AmbientLightBuilder.cs b/NewHorizons/Builder/General/AmbientLightBuilder.cs index 0688850b..36d0c0c0 100644 --- a/NewHorizons/Builder/General/AmbientLightBuilder.cs +++ b/NewHorizons/Builder/General/AmbientLightBuilder.cs @@ -65,8 +65,6 @@ namespace NewHorizons.Builder.General } } - lightGO.AddComponent(); - return light; } } diff --git a/NewHorizons/Components/AmbientLight.cs b/NewHorizons/Components/AmbientLight.cs deleted file mode 100644 index a86a473e..00000000 --- a/NewHorizons/Components/AmbientLight.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using UnityEngine; - -namespace NewHorizons.Components -{ - public class AmbientLight : MonoBehaviour - { - Light light; - float cachedIntensity; - - void Awake() - { - light = GetComponent(); - cachedIntensity = light.intensity; - } - - void Update() - { - var targetIntensity = PlayerState.InDreamWorld() ? 0f : cachedIntensity; - light.intensity = Mathf.MoveTowards(light.intensity, targetIntensity, Time.deltaTime * 5f); - } - } -}