Esempio n. 1
0
 public override void Enter(IslandCameraBaseState lastState, object param = null)
 {
     base.Enter(lastState, param);
     this._building = param as MonoIslandBuilding;
     if ((this._building != null) && (base._sm != null))
     {
         this._startPos  = base._sm.GetPivot();
         this._landedPos = this._building.GetLandedPos();
         this._startTime = Time.time;
         Vector3 vector    = this._landedPos - this._startPos;
         float   magnitude = vector.magnitude;
         this._totalTime      = magnitude / base._sm.GetLandedSpeedFinal(magnitude);
         this._fire_prelanded = false;
         this._startPitch     = base._sm.GetLookAtPitch();
         this._landedPitch    = this._building.GetLandedPitch();
         if ((base._sm != null) && (base._sm.GetGyroManager() != null))
         {
             base._sm.GetGyroManager().SetEnable(false);
         }
         if (Singleton <MainUIManager> .Instance != null)
         {
             MonoIslandUICanvas sceneCanvas = Singleton <MainUIManager> .Instance.SceneCanvas as MonoIslandUICanvas;
             if (sceneCanvas != null)
             {
                 sceneCanvas.TriggerFullScreenBlock(true);
             }
         }
     }
 }
Esempio n. 2
0
 public override void Exit(IslandCameraBaseState nextState)
 {
     this._building = null;
     if (Singleton <MainUIManager> .Instance != null)
     {
         MonoIslandUICanvas sceneCanvas = Singleton <MainUIManager> .Instance.SceneCanvas as MonoIslandUICanvas;
         if (sceneCanvas != null)
         {
             sceneCanvas.TriggerFullScreenBlock(false);
         }
     }
 }
 public override void Exit(IslandCameraBaseState nextState)
 {
     if (this._building != null)
     {
         this._building.SetRenderQueue(E_IslandRenderQueue.Back);
     }
     if (Singleton <MainUIManager> .Instance != null)
     {
         MonoIslandUICanvas sceneCanvas = Singleton <MainUIManager> .Instance.SceneCanvas as MonoIslandUICanvas;
         if (sceneCanvas != null)
         {
             sceneCanvas.SetBuildingEffect(this._building, true);
         }
     }
     this._building = null;
     if ((base._sm != null) && (base._sm.GetGyroManager() != null))
     {
         base._sm.GetGyroManager().SetEnable(true);
     }
 }