Пример #1
0
 public void UpdateAllClouds(Color lightColor, Vector3 lightDirection)
 {
     for (int i = 0; i < clouds.Count; i++)
     {
         SilverLiningCumulusCloud cloud = (SilverLiningCumulusCloud)clouds[i];
         cloud.UpdateLighting(lightColor, lightDirection);
         cloud.GetRenderer().material.SetFloat("fade", cloudAlpha * cloud.GetAlpha());
     }
 }
Пример #2
0
    public void UpdateOneCloud(Color lightColor, Vector3 lightDirection)
    {
        SilverLiningCumulusCloud cloud = (SilverLiningCumulusCloud)clouds[lastCloudUpdated];

        cloud.UpdateLighting(lightColor, lightDirection);
        cloud.GetRenderer().material.SetFloat("fade", cloudAlpha * cloud.GetAlpha());
        cloud.Update();

        lastCloudUpdated++;
        if (lastCloudUpdated == clouds.Count)
        {
            lastCloudUpdated = 0;
        }
    }