mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
233c49b26a
@ -55,6 +55,7 @@ namespace NewHorizons.Components.SizeControllers
|
||||
private float maxScale;
|
||||
private float minScale;
|
||||
private static readonly int ColorRamp = Shader.PropertyToID("_ColorRamp");
|
||||
private static readonly int ColorTime = Shader.PropertyToID("_ColorTime");
|
||||
|
||||
private Color _currentColour;
|
||||
|
||||
@ -159,18 +160,20 @@ namespace NewHorizons.Components.SizeControllers
|
||||
{
|
||||
_currentColour = Color.Lerp(_startColour, _endColour, t);
|
||||
supernova._surface._materials[0].Lerp(_startSurfaceMaterial, _endSurfaceMaterial, t);
|
||||
supernova._surface._materials[0].SetFloat("_ColorTime", t);
|
||||
supernova._surface._materials[0].SetFloat(ColorTime, t);
|
||||
}
|
||||
else
|
||||
{
|
||||
_currentColour = _endColour;
|
||||
supernova._surface._materials[0].SetFloat("_ColorTime", 1);
|
||||
supernova._surface._materials[0].Lerp(_startSurfaceMaterial, _endSurfaceMaterial, 1);
|
||||
supernova._surface._materials[0].SetFloat(ColorTime, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_currentColour = _startColour;
|
||||
supernova._surface._materials[0].SetFloat("_ColorTime", 0);
|
||||
supernova._surface._materials[0].Lerp(_startSurfaceMaterial, _endSurfaceMaterial, 0);
|
||||
supernova._surface._materials[0].SetFloat(ColorTime, 0);
|
||||
}
|
||||
|
||||
if (_flareEmitter != null) _flareEmitter._tint = _currentColour;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user