public static void Make(GameObject body, float topCloudScale, float bottomCloudScale, float waterSize)
        {
            GameObject sunov = new GameObject();

            sunov.SetActive(false);
            sunov.transform.parent = body.transform;

            GiantsDeepSunOverrideVolume vol = sunov.AddComponent <GiantsDeepSunOverrideVolume>();

            vol.SetValue("_sector", MainClass.SECTOR);
            vol.SetValue("_cloudsOuterRadius", topCloudScale / 2);
            vol.SetValue("_cloudsInnerRadius", bottomCloudScale / 2);
            vol.SetValue("_waterOuterRadius", waterSize / 2);
            vol.SetValue("_waterInnerRadius", 402.5f);

            sunov.SetActive(true);
        }
Esempio n. 2
0
        public static void Make(GameObject body, Sector sector, IPlanetConfig config)
        {
            GameObject overrideGO = new GameObject();

            overrideGO.SetActive(false);
            overrideGO.transform.parent = body.transform;

            GiantsDeepSunOverrideVolume GDSOV = overrideGO.AddComponent <GiantsDeepSunOverrideVolume>();

            GDSOV.SetValue("_sector", sector);
            GDSOV.SetValue("_cloudsOuterRadius", config.TopCloudSize / 2);
            GDSOV.SetValue("_cloudsInnerRadius", config.BottomCloudSize / 2);
            GDSOV.SetValue("_waterOuterRadius", config.WaterSize / 2);
            GDSOV.SetValue("_waterInnerRadius", 402.5f);

            overrideGO.SetActive(true);
            Logger.Log("Finished building sun override.", Logger.LogType.Log);
        }