Commit 1f950e3f authored by radow's avatar radow
Browse files

fixed the colour popping at the tree

parent 9718bfb1
......@@ -19432,7 +19432,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -24960,7 +24960,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -40238,7 +40238,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -48245,7 +48245,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -64821,8 +64821,10 @@ MonoBehaviour:
- {fileID: 461428581361299713}
- {fileID: 3519741434942829006}
delays: []
localprog: []
stageduration: 10
lerpduration: 4
progress: 0
--- !u!1 &6169600757696543841
GameObject:
m_ObjectHideFlags: 0
......@@ -68566,7 +68568,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -75051,8 +75053,10 @@ MonoBehaviour:
- {fileID: 461428581361299713}
- {fileID: 3519741434942829006}
delays: []
localprog: []
stageduration: 10
lerpduration: 4
progress: 0
--- !u!65 &8060340116799176054
BoxCollider:
m_ObjectHideFlags: 0
......@@ -104761,7 +104765,7 @@ Light:
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
......@@ -19,7 +19,7 @@ public class Treelights : MonoBehaviour
private void Start()
{
delays = new float[lights.Length];
for(int j = 0; j<lights.Length; j++) delays[j] = Random.Range(0f, 2f);
for (int j = 0; j<lights.Length; j++) delays[j] = Random.Range(0f, 2f);
}
void Update()
......@@ -36,6 +36,7 @@ public class Treelights : MonoBehaviour
for(int j=0; j<lights.Length; j++)
{
lights[j].color = Color.Lerp(colours[i], colours[(i + 1) % colours.Length], Mathf.Clamp01(progress - delays[j]));
}
if (progress-2 >= 1)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment