Пример #1
0
 /// <summary>
 /// Sets the script control fields to reasonable default values for an acceptable day/night cycle effect.
 /// </summary>
 void Reset()
 {
     dayCycleLength = 120.0f;
     //skyTransitionTime = 3.0f; //would be set if UpdateSkybox were used.
     hoursPerDay    = 24.0f;
     dawnTimeOffset = 3.0f;
     fullDark       = new Color(32.0f / 255.0f, 28.0f / 255.0f, 46.0f / 255.0f);
     fullLight      = new Color(253.0f / 255.0f, 248.0f / 255.0f, 223.0f / 255.0f);
     dawnDuskFog    = new Color(133.0f / 255.0f, 124.0f / 255.0f, 102.0f / 255.0f);
     dayFog         = new Color(180.0f / 255.0f, 208.0f / 255.0f, 209.0f / 255.0f);
     nightFog       = new Color(12.0f / 255.0f, 15.0f / 255.0f, 91.0f / 255.0f);
     Skybox[] skyboxes = AssetBundle.FindObjectsOfTypeIncludingAssets(typeof(Skybox)) as Skybox[];
     foreach (Skybox box in skyboxes)
     {
         if (box.name == "DawnDusk Skybox")
         {
             dawnDuskSkybox = box.material;
         }
         else if (box.name == "StarryNight Skybox")
         {
             nightSkybox = box.material;
         }
         else if (box.name == "Sunny2 Skybox")
         {
             daySkybox = box.material;
         }
     }
 }