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);
             }
         }
     }
 }
Exemple #2
0
        private bool OnIslandCameraLanded(MonoIslandBuilding building)
        {
            Singleton <WwiseAudioManager> .Instance.Post("UI_Island_Building_ZoomIn", null, null, null);

            Singleton <MainUIManager> .Instance.ShowPage(new CabinOverviewPageContext(this._buildingDataDict[building], this._buildingDataDict), UIType.Page);

            return(false);
        }
Exemple #3
0
        private void SetupBuilding(MonoIslandBuilding building)
        {
            CabinDataItemBase base2 = this.buildingDataDict[building];
            int extendGrade         = (base2.status != CabinStatus.UnLocked) ? 1 : base2.extendGrade;
            CabinExtendGradeMetaData cabinExtendGradeMetaDataByKey = CabinExtendGradeMetaDataReader.GetCabinExtendGradeMetaDataByKey(base2.cabinType, extendGrade);

            building.UpdateBuildingWhenExtend(cabinExtendGradeMetaDataByKey.buildingPath);
        }
 public override void Exit(IslandCameraBaseState nextState)
 {
     this._building = null;
     if ((base._sm != null) && (base._sm.GetGyroManager() != null))
     {
         base._sm.GetGyroManager().SetEnable(true);
     }
 }
Exemple #5
0
 public override void OnTouchUp(Gesture gesture)
 {
     if (((this._selectObj != null) && (this._selectObj == gesture.pickedObject)) && (this._fingerIndex == gesture.fingerIndex))
     {
         MonoIslandBuilding component = this._selectObj.GetComponent <MonoIslandBuilding>();
         if (component != null)
         {
             base._sm.GotoState(E_IslandCameraState.ToLanded, component);
         }
     }
 }
Exemple #6
0
 private void Awake()
 {
     this._camera                 = base.transform;
     this._mainCameraTran         = base.transform.Find("MainCamera");
     this._buildingsUtil          = GameObject.Find("IslandWorld").GetComponent <MonoIslandBuildingsUtil>();
     this._cover                  = base.transform.Find("MainCamera/Cover");
     this._cameraBasePos.position = base.transform.position;
     this._cameraBasePos.rotation = base.transform.rotation;
     this._gyroManager            = base.GetComponent <IslandCameraNavigatorNew>();
     this._engine                 = GameObject.Find("IslandWorld/Engine").GetComponent <MonoIslandBuilding>();
 }
 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);
         }
     }
 }
Exemple #8
0
 private void PlayEffect(Transform effectTrans, bool bBuildingPos = false)
 {
     if (bBuildingPos)
     {
         MonoIslandBuilding building = this._data2BuildingDict[this._cabinData.cabinType];
         effectTrans.position = building.transform.position;
     }
     foreach (ParticleSystem system in effectTrans.GetComponentsInChildren <ParticleSystem>())
     {
         system.Play();
     }
 }
Exemple #9
0
        private bool OnIslandCameraLanded(MonoIslandBuilding buidling)
        {
            CabinDataItemBase base2 = this._buildingDataDict[buidling];

            if (base2.status == CabinStatus.UnLocked)
            {
                this._cabinData = base2;
                this.SetupView();
            }
            else
            {
                this.BackPage();
            }
            return(false);
        }
Exemple #10
0
        private bool OnBeginExtend(int extendGrade)
        {
            MonoIslandBuilding       building = this._data2BuildingDict[this._cabinData.cabinType];
            CabinExtendGradeMetaData cabinExtendGradeMetaDataByKey = CabinExtendGradeMetaDataReader.GetCabinExtendGradeMetaDataByKey(this._cabinData.cabinType, extendGrade);

            building.UpdateBuildingWhenExtend(cabinExtendGradeMetaDataByKey.buildingPath);
            building.AddHighLightMat(null);
            building.SetHighLightAlpha(1f);
            building.SetRenderQueue(E_IslandRenderQueue.Front);
            building.SetPolygonOffset(building.highlight_polygon_offset);
            Singleton <WwiseAudioManager> .Instance.Post("UI_Island_Building_Extension", null, null, null);

            this.PlayEffect(base.view.transform.Find("EffectContainer/IslandCabinExtend"), true);
            return(false);
        }
 public override void Enter(IslandCameraBaseState lastState, object param = null)
 {
     base.Enter(lastState, param);
     this._building = param as MonoIslandBuilding;
     if (this._building != null)
     {
         this._startPos   = this._building.GetFocusPos();
         this._finalPos   = this._building.GetLandedPos();
         this._startPitch = this._building.GetFocusPitch();
         this._finalPitch = base._sm.GetCameraBasePos().eulerAngles.x;
         this._startTime  = Time.time;
         Vector3 vector2 = this._finalPos - this._startPos;
         this._totalTime = vector2.magnitude / base._sm._backto_landed_speed;
     }
 }
 public override void Enter(IslandCameraBaseState lastState, object param = null)
 {
     base.Enter(lastState, param);
     this._building = param as MonoIslandBuilding;
     if (this._building != null)
     {
         this._startPos   = this._building.GetLandedPos();
         this._focusPos   = this._building.GetFocusPos();
         this._startPitch = base._sm.GetLookAtPitch();
         this._focusPitch = this._building.GetFocusPitch();
         this._startTime  = Time.time;
         Vector3 vector = this._focusPos - this._startPos;
         this._totalTime     = vector.magnitude / base._sm._to_focus_speed;
         this._fire_prefocus = false;
         (Singleton <MainUIManager> .Instance.SceneCanvas as MonoIslandUICanvas).TriggerFullScreenBlock(true);
     }
 }
Exemple #13
0
 public void SetBuildingEffect(MonoIslandBuilding excludeBuilding, bool enable)
 {
     foreach (KeyValuePair <MonoIslandBuilding, CabinDataItemBase> pair in this.buildingDataDict)
     {
         if (pair.Key != excludeBuilding)
         {
             if (enable)
             {
                 pair.Key.GetModel().ToUnMaskedGraphic();
             }
             else
             {
                 pair.Key.GetModel().ToMaskedGraphic();
             }
         }
     }
 }
Exemple #14
0
        public void BackToBase()
        {
            MonoIslandBuilding param = null;

            if (this._currentState == this._focusingState)
            {
                param = this._focusingState.GetBuilding();
            }
            else if (this._currentState == this._landingState)
            {
                param = this._landingState.GetBuilding();
            }
            else
            {
                return;
            }
            this.GotoState(E_IslandCameraState.BackToBase, param);
        }
        public override void Enter(IslandCameraBaseState lastState, object param = null)
        {
            base.Enter(lastState, param);
            this._startPos   = base._sm.GetPivot();
            this._finalPos   = base._sm.GetCameraBasePos().position;
            this._startPitch = base._sm.GetLookAtPitch();
            this._finalPitch = base._sm.GetCameraBasePos().eulerAngles.x;
            this._startTime  = Time.time;
            Vector3 vector2   = this._finalPos - this._startPos;
            float   magnitude = vector2.magnitude;

            this._totalTime = magnitude / base._sm.GetBackToBaseSpeed(magnitude);
            base._sm.TriggerCover(E_AlphaLerpDir.ToLittle);
            this._building = param as MonoIslandBuilding;
            if (this._building != null)
            {
                this._building.TriggerHighLight(E_AlphaLerpDir.ToLittle);
            }
        }
 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);
     }
 }
Exemple #17
0
        public void BindingTargetBuilding(MonoIslandBuilding target, CabinDataItemBase cabinData)
        {
            this._cabinData  = cabinData;
            this._target     = target;
            this._isUpdating = true;
            Dictionary <CabinType, bool> cabinNeedToShowNewUnlockDict = Singleton <MiHoYoGameData> .Instance.LocalData.CabinNeedToShowNewUnlockDict;
            bool flag = !cabinNeedToShowNewUnlockDict.ContainsKey(this._cabinData.cabinType) ? false : cabinNeedToShowNewUnlockDict[this._cabinData.cabinType];

            this._LvInfo_Lv_PopUp_New.gameObject.SetActive(flag);
            this._LvInfo_Lv_PopUp_PopUp.gameObject.SetActive(false);
            if (!flag)
            {
                this.RefreshPopUp();
            }
            this._target.GetModel().RefreshLockStyle(this._cabinData.status);
            bool flag2 = (this._cabinData is CabinCollectDataItem) && (this._cabinData as CabinCollectDataItem).CanFetchScoin();

            this._Output.gameObject.SetActive(flag2);
            this._lastFrame_output_active = flag2;
            this._Locked.gameObject.SetActive(this._cabinData.status == CabinStatus.Locked);
            this._LvInfo.gameObject.SetActive(this._cabinData.status == CabinStatus.UnLocked);
            this._lastFrame_cabinStatus = this._cabinData.status;
            if (this._cabinData.status == CabinStatus.UnLocked)
            {
                this._LvInfo_Lv_Name_TextComp.text = this._cabinData.GetCabinName();
            }
            bool flag3 = this._cabinData.levelUpEndTime > TimeUtil.Now;

            this._LvInfo_LvUpProgress.gameObject.SetActive(flag3);
            if (flag3)
            {
                E_TimeFormat timeFormat = this.GetTimeFormat((TimeSpan)(this._cabinData.levelUpEndTime - TimeUtil.Now));
                this.SetUITimeFormat(timeFormat);
                this._lastFrame_timeFormat = timeFormat;
            }
        }
 public override void Exit(IslandCameraBaseState nextState)
 {
     this._building = null;
 }
 public override void Enter(IslandCameraBaseState lastState, object param = null)
 {
     base.Enter(lastState, param);
     this._building = param as MonoIslandBuilding;
     (Singleton <MainUIManager> .Instance.SceneCanvas as MonoIslandUICanvas).TriggerFullScreenBlock(false);
 }
Exemple #20
0
 public CabinDataItemBase GetCabinDataByBuilding(MonoIslandBuilding building)
 {
     return(this.buildingDataDict[building]);
 }
Exemple #21
0
 private bool OnCabinLevelUpSucc(MonoIslandBuilding building)
 {
     this.PlayEffect(base.view.transform.Find("EffectContainer/IslandCabinLvUp"), building, true);
     return(false);
 }