private void DestinationPlanetLoadSuccess(object asset, object cookie) { this.destinationPlanetLoadReturned = true; this.destinationPlanetGameObject = (asset as GameObject); if (this.destinationPlanetGameObject == null) { Service.Get <StaRTSLogger>().Warn("Invalid GameObject: " + this.destinationVO.GalaxyAssetName); } else { this.planetMaterial = PlanetUtils.StopPlanetSpinning(this.destinationPlanetGameObject); } this.AssembleHyperSpace(); }
private void AssembleLoadingScene() { if (this.onlyLoadUI) { if (!this.uiLoadReturned) { return; } this.ExecuteCallBack(); } if (!this.uiLoadReturned || !this.modelAssetLoadReturned || !this.planetAssetLoadReturned || !this.planetGlowAssetLoadReturned || !this.starfieldAssetLoadReturned) { return; } if (this.modelGameObject != null) { UnityUtils.SetLayerRecursively(this.modelGameObject, 9); Transform transform = this.modelGameObject.transform; transform.parent = base.Root.transform.parent; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = Vector3.one; this.planetAnchor = UnityUtils.FindGameObject(this.modelGameObject, "PlanetAnchor"); } if (this.planetAnchor != null) { Camera camera = Service.CameraManager.UXSceneCamera.Camera; if (this.planetGameObject != null) { this.planetGameObject.SetActive(true); UnityUtils.SetLayerRecursively(this.planetGameObject, 9); Transform transform2 = this.planetGameObject.transform; transform2.parent = this.planetAnchor.transform; transform2.localPosition = Vector3.zero; transform2.localRotation = Quaternion.identity; transform2.localScale = Vector3.one; this.planetMaterial = PlanetUtils.StopPlanetSpinning(this.planetGameObject); Service.GalaxyPlanetController.SetPlanetLighting(this.planetGameObject, this.planetMaterial, camera); } if (this.planetGlowGameObject != null) { this.planetGlowGameObject.SetActive(true); UnityUtils.SetLayerRecursively(this.planetGlowGameObject, 9); Transform transform3 = this.planetGlowGameObject.transform; transform3.parent = this.planetAnchor.transform; transform3.localPosition = Vector3.zero; transform3.localRotation = Quaternion.identity; transform3.localScale = Vector3.one; transform3.LookAt(camera.transform.position); } } if (this.starsGameObject != null) { UnityUtils.SetLayerRecursively(this.starsGameObject, 9); Transform transform4 = this.starsGameObject.transform; transform4.parent = base.Root.transform.parent; transform4.localPosition = Vector3.zero; transform4.localRotation = Quaternion.identity; transform4.localScale = Vector3.one; } this.ExecuteCallBack(); }