Remove ambient light code

This commit is contained in:
Joshua Thome 2024-10-05 01:29:25 -05:00
parent 2b24279713
commit 3317221f58
2 changed files with 0 additions and 29 deletions

View File

@ -65,8 +65,6 @@ namespace NewHorizons.Builder.General
}
}
lightGO.AddComponent<AmbientLight>();
return light;
}
}

View File

@ -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<Light>();
cachedIntensity = light.intensity;
}
void Update()
{
var targetIntensity = PlayerState.InDreamWorld() ? 0f : cachedIntensity;
light.intensity = Mathf.MoveTowards(light.intensity, targetIntensity, Time.deltaTime * 5f);
}
}
}