Ejemplo n.º 1
0
 protected void StartTransitionOut(PlanetVO planetVO, bool forSoftWipe, bool zoomOut)
 {
     if (this.softWipe)
     {
         if (this.softWipeComplete)
         {
             this.OnTransitionOutComplete(null);
         }
         else
         {
             this.softWipeWorldLoad = true;
         }
     }
     else
     {
         this.CleanupTransitionVisuals();
         if (planetVO == null)
         {
             planetVO = Service.Get <IDataController>().Get <PlanetVO>("planet1");
         }
         this.transitionVisuals = new TransitionVisuals(planetVO, new TransitionVisualsLoadedDelegate(this.OnTransitionVisualsLoaded), forSoftWipe, false);
         if (zoomOut)
         {
             Service.Get <WorldInitializer>().View.ZoomOut();
         }
     }
     this.softWipe = forSoftWipe;
 }
Ejemplo n.º 2
0
 protected void CleanupTransitionVisuals()
 {
     if (this.transitionVisuals != null)
     {
         this.transitionVisuals.Cleanup();
         this.transitionVisuals = null;
     }
 }
Ejemplo n.º 3
0
 private void CleanUp()
 {
     this.destinationVO = null;
     if (this.hyperspaceHandle != AssetHandle.Invalid)
     {
         this.assetManager.Unload(this.hyperspaceHandle);
         this.hyperspaceHandle = AssetHandle.Invalid;
     }
     if (this.destinationHandle != AssetHandle.Invalid)
     {
         this.assetManager.Unload(this.destinationHandle);
         this.destinationHandle = AssetHandle.Invalid;
     }
     if (this.currentPlanetHandle != AssetHandle.Invalid)
     {
         this.assetManager.Unload(this.currentPlanetHandle);
         this.currentPlanetHandle = AssetHandle.Invalid;
     }
     if (this.currentPlanetGameObject != null)
     {
         UnityEngine.Object.Destroy(this.currentPlanetGameObject);
         this.currentPlanetGameObject = null;
     }
     if (this.destinationPlanetGameObject != null)
     {
         UnityEngine.Object.Destroy(this.destinationPlanetGameObject);
         this.destinationPlanetGameObject = null;
     }
     if (this.planetGlowGameObject != null)
     {
         UnityEngine.Object.Destroy(this.planetGlowGameObject);
         this.planetGlowGameObject = null;
     }
     if (this.assetHandlePlanetGlow != AssetHandle.Invalid)
     {
         this.assetManager.Unload(this.assetHandlePlanetGlow);
         this.assetHandlePlanetGlow = AssetHandle.Invalid;
     }
     if (this.assetHandleRelocationAudio != AssetHandle.Invalid)
     {
         this.assetManager.Unload(this.assetHandleRelocationAudio);
         this.assetHandleRelocationAudio = AssetHandle.Invalid;
     }
     if (this.hyperspaceGameObject != null)
     {
         UnityEngine.Object.Destroy(this.hyperspaceGameObject);
         this.hyperspaceGameObject = null;
     }
     if (this.transitionVisuals != null)
     {
         this.transitionVisuals.Cleanup();
         this.transitionVisuals = null;
     }
     UnityUtils.DestroyMaterial(this.planetMaterial);
     this.relocationInProgress = false;
 }
Ejemplo n.º 4
0
 public void HyperspaceComplete()
 {
     this.transitionVisuals = new TransitionVisuals(this.destinationVO, new TransitionVisualsLoadedDelegate(this.UILoaded), null, true);
 }