mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Remove ambient light code
This commit is contained in:
parent
2b24279713
commit
3317221f58
@ -65,8 +65,6 @@ namespace NewHorizons.Builder.General
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lightGO.AddComponent<AmbientLight>();
|
|
||||||
|
|
||||||
return light;
|
return light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user