internal Clouds2D CloneForMainMenu(GameObject mainMenuBody) { Clouds2D mainMenu = new Clouds2D(); mainMenu.macroCloudMaterial = this.macroCloudMaterial; mainMenu.shadowMaterial = this.shadowMaterial; mainMenu.isMainMenu = true; if (mainMenuBody.name.EndsWith("(Clone)")) { // There is a race condition with Kopernicus. Sometimes, it // will have cloned a body that already had clouds. Hide old clouds. for (var c = 0; c < mainMenuBody.transform.childCount; ++c) { var child = mainMenuBody.transform.GetChild(c).gameObject; if (child.name.StartsWith("EVE ") && child.name.EndsWith("(Clone)")) { child.SetActive(false); } } } mainMenu.Apply(this.celestialBody, mainMenuBody.transform, this.cloudsMat, this.CloudMesh.name, this.radius, this.arc, (Tools.Layer)mainMenuBody.layer); return(mainMenu); }
internal Clouds2D CloneForMainMenu(GameObject mainMenuBody) { Clouds2D mainMenu = new Clouds2D(); mainMenu.macroCloudMaterial = this.macroCloudMaterial; mainMenu.shadowMaterial = this.shadowMaterial; mainMenu.isMainMenu = true; mainMenu.Apply(this.celestialBody, mainMenuBody.transform, this.cloudsMat, this.radius, (Tools.Layer)mainMenuBody.layer); return(mainMenu); }
internal Clouds2D CloneForMainMenu(GameObject mainMenuBody) { Clouds2D mainMenu = new Clouds2D(); mainMenu.macroCloudMaterial = this.macroCloudMaterial; mainMenu.shadowMaterial = this.shadowMaterial; mainMenu.isMainMenu = true; mainMenu.Apply(this.celestialBody, mainMenuBody.transform, this.cloudsMat, this.radius, (Tools.Layer)mainMenuBody.layer); return mainMenu; }