From 79457ed9f96d8b2b1e097a8e8940d09bb20385aa Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 19 四月 2019 09:44:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/MainInterfacePanel/MainInterfaceWin.cs |  316 ++++++++++------------------------------------------
 1 files changed, 62 insertions(+), 254 deletions(-)

diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index 12c2979..c0f0dab 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -32,7 +32,7 @@
         [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
         [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
         [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;
-        [SerializeField] AnimationFadeOut m_AnimationFadeOut;
+        [SerializeField] RightBottomFadeInOut m_RightBottomFadeInOut;
 
         [SerializeField] IntensifySmoothSlider _ExpSlider;//缁忛獙鏉�
         [SerializeField] Button _DownButton;//鏌ョ湅缁忛獙鏁板��
@@ -46,7 +46,6 @@
         [SerializeField] Transform CopyOfThePanel;
         [SerializeField] GameObject m_TaskAndTeamTip;
         [SerializeField] GameObject m_MailObj;//閭欢鏄鹃殣
-        [SerializeField] ClickScreenOtherSpace _MarkRay;//渚挎嵎鍒囨崲鎸夐挳            
 
         [SerializeField] MainPositionTween m_MainPositionTween;
         [SerializeField] MainButtonMisc m_MainButtonMisc;
@@ -55,14 +54,12 @@
         private bool TaskSwithBool = true;
         private float ExpValueFloat = 0;
         private bool SliderOpen = true;
-        public static bool recordPositionBool = true;
-        private int mapId = 0;
+
         public static event Action Event_ChatCallback;
         public static event Action<bool, float> Event_Duplicates;
         #endregion
         private List<int> ListBossMapId = new List<int>();//鐢ㄤ簬boss鍖哄煙鍦板浘id
         public static event Action<bool> IsCopyOfThePanel;
-        public static event Action IsOpenMaininterface;
 
         PlayerMainDate onMainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
         TaskModel onPlayerTask { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
@@ -70,14 +67,12 @@
         PKModel pKModel { get { return ModelCenter.Instance.GetModel<PKModel>(); } }
         FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
         FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
-        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
 
         #region Built-in
         private bool IsUpdateBool = true;
         protected override void BindController()
         {
             m_MapSwitchingBehaviour.InitAwake();
-            recordPositionBool = true;
             TaskSwithBool = true;
             m_MainPositionTween.SetTaskPos(true);
             m_MailObj.SetActive(true);
@@ -94,17 +89,12 @@
         {
             UIEventTrigger.Get(_DownButton.gameObject).OnDown = DownButton;
             UIEventTrigger.Get(_DownButton.gameObject).OnUp = UpButton;
-            _MarkRay.AddListener(MarkRayButton);
             _SwitchShowBtn.SetListener(SwitchShowButton);
             m_TaskSwithButton.SetListener(TaskSwithButton);
         }
 
         protected override void OnPreOpen()
         {
-            if (IsOpenMaininterface != null)
-            {
-                IsOpenMaininterface();
-            }
             IsUpdateBool = true;
             SliderOpen = true;
             m_InGamePusher.Init();
@@ -118,12 +108,12 @@
             m_TaskListTip.Init();
             m_IsShowXp.Init();
             m_TopRightTip.Init();
-            m_AnimationFadeOut.Init();
             m_TeamInvitationEntrance.Init();
             m_FairyCallBehaviour.Init();
             m_MapSwitchingBehaviour.Init();
             m_FairyLeagueRemind.Init();
             m_MainButtonMisc.Init();
+            m_RightBottomFadeInOut.Init();
             m_BossBriefInfos.gameObject.SetActive(false);
             ArticleExperience();//鍏充簬缁忛獙鏉�
             CheckChatTipOpen();
@@ -131,7 +121,6 @@
             FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
             GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
             NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
-            NewBieCenter.Instance.guideCompletedEvent += OnGuideCompleted;
             WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent;
             WindowCenter.Instance.windowAfterCloseEvent += WindowAfterEvent;
             NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;
@@ -142,16 +131,55 @@
 
         protected override void OnActived()
         {
+            m_MainPositionTween.Switch(new MainPositionTween.SwitchParam()
+            {
+                immediately = true,
+                showDefault = true,
+            });
+
             m_MainButtonMisc.OnActived();
             IsShowTaskPanel();//鏄惁鏄剧ず浠诲姟闈㈡澘
+
+            if (MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID))
+            {
+                m_FunctionForecastTip.gameObject.SetActive(false);
+            }
+            else
+            {
+                m_FunctionForecastTip.gameObject.SetActive(true);
+            }
+
+            var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
+            if (isNeutralMap)
+            {
+                m_BossBriefInfos.gameObject.SetActive(true);
+                if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID)
+                {
+                    var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses();
+                    m_BossBriefInfos.Display(bosses);
+                }
+                else if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID)
+                {
+                    var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetBosses();
+                    m_BossBriefInfos.Display(bosses);
+                }
+                else
+                {
+                    var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);
+                    m_BossBriefInfos.Display(bosses);
+                }
+            }
+            else
+            {
+                m_BossBriefInfos.gameObject.SetActive(false);
+            }
+
         }
 
         protected override void OnAfterOpen()
         {
-            bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//鏄惁鍦˙oss鍖哄煙
-            var inDungeon = IsDungeon();
-            var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool && !m_MainPositionTween.IsTaskAndPanelShow);
-            var judge2 = mapId != PlayerDatas.Instance.baseData.MapID;
+            bool inBossArea = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//鏄惁鍦˙oss鍖哄煙
+            var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !inBossArea && !m_MainPositionTween.IsTaskAndPanelShow);
 
             if (judge1)
             {
@@ -159,68 +187,7 @@
                 onMainModel.IsBossAreaTask = false;
                 onMainModel.IsDead = false;
             }
-
-            if (m_AnimationFadeOut.GetIsFadeIn())
-            {
-                _MarkRay.gameObject.SetActive(true);
-            }
-            else
-            {
-                _MarkRay.gameObject.SetActive(false);
-            }
-            if (inDungeon)
-            {
-                m_FunctionForecastTip.gameObject.SetActive(false);
-                if (judge2)
-                {
-                    SetTipPanelOrBossList(false, false);
-                }
-                if (m_AnimationFadeOut.GetIsFadeIn() && judge2)
-                {
-                    m_MailObj.SetActive(true);
-                    m_MainPositionTween.SetSkillTipOrRightTipPos(true);
-                    recordPositionBool = true;
-                }
-            }
-            else
-            {
-                m_FunctionForecastTip.gameObject.SetActive(true);
-                var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
-
-                if (isNeutralMap)
-                {
-                    m_BossBriefInfos.gameObject.SetActive(true);
-                    if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID)
-                    {
-                        var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses();
-                        m_BossBriefInfos.Display(bosses);
-                    }
-                    else if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID)
-                    {
-                        var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetBosses();
-                        m_BossBriefInfos.Display(bosses);
-                    }
-                    else
-                    {
-                        var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);
-                        m_BossBriefInfos.Display(bosses);
-                    }
-                }
-                else
-                {
-                    m_BossBriefInfos.gameObject.SetActive(false);
-                }
-
-                if (isNeutralMap && judge2)
-                {
-                    SetTipPanelOrBossList(false, false);
-                }
-                else if (!isNeutralMap && !IsBossBool)
-                {
-                    SetTipPanelOrBossList(true, false);
-                }
-            }
-            mapId = PlayerDatas.Instance.baseData.MapID;
+      
             m_HighSettingTip.AfterOpen();
             m_ChatTip.OnAfterOpen();
             HandleAchievement();
@@ -239,17 +206,16 @@
             m_TaskListTip.UnInit();
             m_TopRightTip.UnInit();
             m_FunctionForecastTip.Unit();
-            m_AnimationFadeOut.Unit();
             m_TeamInvitationEntrance.UnInit();
             m_FairyCallBehaviour.UnInit();
             m_FairyLeagueRemind.UnInit();
             m_MainButtonMisc.UnInit();
+            m_RightBottomFadeInOut.UnInit();
 
             PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;
             FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
             GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
             NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
-            NewBieCenter.Instance.guideCompletedEvent -= OnGuideCompleted;
             WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent;
             WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterEvent;
             NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
@@ -316,14 +282,6 @@
             }
         }
 
-        private void OnGuideCompleted(int obj)//寮曞缁撴潫
-        {
-            if (m_AnimationFadeOut.GetIsFadeIn())
-            {
-                _MarkRay.gameObject.SetActive(true);
-            }
-        }
-
         private void OnEnterOrExitArea(MapArea.E_Type _areaType, bool _enter)
         {
             if (PlayerDatas.Instance.baseData.MapID == 10040 && _areaType != MapArea.E_Type.Boss && _enter)
@@ -352,15 +310,6 @@
                     TaskSwithButton();
                     onMainModel.IsBossAreaTask = true;
                 }
-                if (m_MainPositionTween.IsSetCopyOfThePanelShow)
-                {
-                    if (NewBieCenter.Instance.inGuiding)
-                    {
-                        return;
-                    }
-                    recordPositionBool = false;
-                    SwitchShowButton();
-                }
             }
 
             if ((_areaType == MapArea.E_Type.Boss && !_enter) || (_areaType != MapArea.E_Type.Normal && (_areaType != MapArea.E_Type.Boss && _enter)))
@@ -372,15 +321,7 @@
                 }
             }
 
-            var inDungeon = IsDungeon();
-            var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
-            if (_areaType == MapArea.E_Type.Boss && !_enter)
-            {
-                if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon && !isNeutralMap)
-                {
-                    SetTipPanelOrBossList(true, true);
-                }
-            }
+            m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });
         }
 
         private void AtkTypeChange()//楠戝疇浜夊ず鏄惁鍒囨崲鐘舵��
@@ -429,42 +370,6 @@
             }
         }
 
-        public void MarkRayButton()
-        {
-            if (NewBieCenter.Instance.inGuiding)
-            {
-                return;
-            }
-
-            if (treasureModel.treasureStageUpShow || treasureModel.newGotShowing)
-            {
-                return;
-            }
-
-            var inDungeon = IsDungeon();
-            var inBossArea = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//鏄惁鍦˙oss鍖哄煙
-            var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
-
-            if (!recordPositionBool)
-            {
-                if (inDungeon || inBossArea || isNeutralMap)
-                {
-                    SetTipPanelOrBossList(false, true);
-                }
-                if (!inBossArea)
-                {
-                    if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
-                    {
-                        SetTipPanelOrBossList(true, true);
-                    }
-                }
-                m_MailObj.SetActive(true);
-                recordPositionBool = true;
-                m_MainPositionTween.SetRotation(false);
-                m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
-            }
-        }
-
         void DownButton(GameObject go)
         {
             _ExpRate.gameObject.SetActive(true);
@@ -496,39 +401,12 @@
 
         void SwitchShowButton()
         {
-            var inDungeon = IsDungeon();
-            bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);
-            var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
-            var judge1 = inDungeon || IsBossBool || isNeutralMap;
-            var judge2 = !IsBossBool && !m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon;
-
-            if (recordPositionBool)//鏄剧ず鍔熻兘鍏ュ彛
+            m_MainPositionTween.Switch(new MainPositionTween.SwitchParam()
             {
-                if (judge1 || judge2)
-                {
-                    SetTipPanelOrBossList(true, true);
-                }
-                m_MailObj.SetActive(false);
-                _MarkRay.gameObject.SetActive(true);
-                m_MainPositionTween.SetSkillTipOrRightTipPosTween(false);
-                m_MainPositionTween.SetRotation(true);
+                showDefault = !MainPositionTween.isDefaultState,
+                immediately = false
             }
-            else//鏄剧ず榛樿
-            {
-                if (judge1)
-                {
-                    SetTipPanelOrBossList(false, true);
-                }
-                if (judge2)
-                {
-                    SetTipPanelOrBossList(true, true);
-                }
-                m_MailObj.SetActive(true);
-                _MarkRay.gameObject.SetActive(false);
-                m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
-                m_MainPositionTween.SetRotation(false);
-            }
-            recordPositionBool = !recordPositionBool;
+            );
         }
 
         // 鍓嶆湡鎴樻枟鐢ㄥ己鍒惰缃换鍔′綅缃�昏緫
@@ -631,7 +509,7 @@
                     onMainModel.IsBossAreaTask = false;
                 }
 
-                ShowBtnGroup();//鏄剧ず鎸夐挳缁勯殣钘忔妧鑳界粍(寮哄埗鍒囨崲)
+                m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });
                 m_HighSettingFadeInFadeOut.SwitchImmedidately(true);
             }
         }
@@ -640,10 +518,12 @@
         {
             if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)
             {
-                if (m_MainPositionTween.IsRightTipPanelShow)//鎶�鑳介潰鏉挎敹璧风姸鎬�
+                m_MainPositionTween.Switch(new MainPositionTween.SwitchParam()
                 {
-                    ShowCastSkill();//鏄剧ず鎶�鑳界粍闅愯棌鎸夐挳缁�(寮哄埗鍒囨崲)
-                }
+                    showDefault = true,
+                    immediately = true
+                });
+
                 var _cfg = SuccessConfig.Get(AchievementGoto.guideAchievementId);
                 var _skillId = SkillConfig.FindSkillByJob(_cfg.Condition, PlayerDatas.Instance.baseData.Job);
                 if (_skillId != 0)
@@ -684,32 +564,6 @@
             }
         }
 
-        public void IsShowButtonGroup()
-        {
-            if (m_MainPositionTween.IsRightTipPanelShow)//鎶�鑳介潰鏉垮睍绀�
-            {
-                ShowBtnGroup();//鏄剧ず鎸夐挳缁勯殣钘忔妧鑳界粍(寮哄埗鍒囨崲)
-            }
-        }
-
-        private void ShowBtnGroup()//鏄剧ず鎸夐挳缁�,闅愯棌鎶�鑳界粍(寮哄埗鍒囨崲)
-        {
-            m_MainPositionTween.SetSkillTipOrRightTipPos(false);
-            m_MailObj.SetActive(false);
-            m_MainPositionTween.SetRotation(true);
-            recordPositionBool = false;
-            _MarkRay.gameObject.SetActive(true);
-        }
-
-        private void ShowCastSkill()//鏄剧ず鎶�鑳界粍,闅愯棌鎸夐挳缁�(寮哄埗鍒囨崲)
-        {
-            m_MainPositionTween.SetSkillTipOrRightTipPos(true);
-            m_MailObj.SetActive(true);
-            m_MainPositionTween.SetRotation(false);
-            recordPositionBool = true;
-            _MarkRay.gameObject.SetActive(false);
-        }
-
         private void IsShowTaskPanel()//鏄惁鏄剧ず浠诲姟闈㈡澘
         {
             var inDungeon = IsDungeon();
@@ -747,10 +601,8 @@
                 m_TaskSwithButton.gameObject.SetActive(false);
                 m_InGamePusher.gameObject.SetActive(false);
                 IsShowTaskPanel();
-                if (m_MainPositionTween.IsRightTipPanelShow)//鎶�鑳介潰鏉挎敹璧风姸鎬�
-                {
-                    ShowCastSkill();//鏄剧ず鎶�鑳界粍,闅愯棌鎸夐挳缁�(寮哄埗鍒囨崲)
-                }
+                m_MailObj.SetActive(false);
+                m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = true });
             }
             else
             {
@@ -762,6 +614,7 @@
                 m_FunctionForecastTip.gameObject.SetActive(true);
                 m_TaskSwithButton.gameObject.SetActive(true);
                 m_InGamePusher.gameObject.SetActive(true);
+                m_MailObj.SetActive(true);
                 if (WindowCenter.Instance.IsOpen<FightingPKWin>())
                 {
                     WindowCenter.Instance.Close<FightingPKWin>();
@@ -769,50 +622,5 @@
             }
         }
 
-        private void SetTipPanelOrBossList(bool _bool, bool _isTween)//椤跺眰鎸夐挳缁勫拰boss鍒楄〃鐨勭浉浜掑垏鎹�
-        {
-            var inDungeon = IsDungeon();
-            m_BossBriefInfos.Unfold(false);
-            if (_bool)
-            {
-                if (IsCopyOfThePanel != null)
-                {
-                    IsCopyOfThePanel(true);
-                }
-                if (Event_Duplicates != null && inDungeon)
-                {
-                    Event_Duplicates(true, m_MainPositionTween.rightTopSwitchTime);
-                }
-                onMainModel.MainTopPanelShow = true;
-                if (_isTween)
-                {
-                    m_MainPositionTween.SetTipAndBossTweenPos(true);
-                }
-                else
-                {
-                    m_MainPositionTween.SetTipAndBossPos(true);
-                }
-            }
-            else
-            {
-                if (IsCopyOfThePanel != null)
-                {
-                    IsCopyOfThePanel(false);
-                }
-                if (Event_Duplicates != null && inDungeon)
-                {
-                    Event_Duplicates(false, m_MainPositionTween.rightTopSwitchTime);
-                }
-                onMainModel.MainTopPanelShow = false;
-                if (_isTween)
-                {
-                    m_MainPositionTween.SetTipAndBossTweenPos(false);
-                }
-                else
-                {
-                    m_MainPositionTween.SetTipAndBossPos(false);
-                }
-            }
-        }
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0