//static AtmosphereVolume test; protected void Awake() { if (HighLogic.LoadedScene == GameScenes.MAINMENU && !Loaded) { OverlayMgr.Init(); loadCloudLayers(false); //test = new AtmosphereVolume("Kerbin", new Vector2(0,0)); Loaded = true; } }
protected void Awake() { if (HighLogic.LoadedScene == GameScenes.FLIGHT && !setup) { OverlayMgr.Init(); ConfigNode[] cityLightsConfigs = GameDatabase.Instance.GetConfigNodes("CITY_LIGHTS"); foreach (ConfigNode node in cityLightsConfigs) { float altitude = float.Parse(node.GetValue("altitude")); float fadeDistance = float.Parse(node.GetValue("fadeDistance")); float pqsfadeDistance = float.Parse(node.GetValue("pqsFadeDistance")); TextureSet mTexture = new TextureSet(node.GetNode("main_texture"), false); TextureSet dTexture = new TextureSet(node.GetNode("detail_texture"), false); AddOverlay(mTexture, dTexture, altitude, fadeDistance, pqsfadeDistance); } setup = true; } }