From e3f8216b5af8e0726b7e818a4a5062f38bce1e77 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 20 二月 2019 15:20:37 +0800
Subject: [PATCH] 3335 主界面修改
---
System/MainInterfacePanel/MainInterfaceWin.cs | 193 ++++++++++++++++--------------------------------
1 files changed, 64 insertions(+), 129 deletions(-)
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index 91478ee..a569bdc 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -29,13 +29,8 @@
[SerializeField] IsShowXpButton m_IsShowXp;//XP 鎶�鑳藉父鏄�
[SerializeField] SkillButtonEffects m_SkillButtonEffects;
- [Header("鍓湰闈㈡澘绉诲姩閫熷害")]
- public float CopyOfThePanelSpeed = 1f;//鍓湰闈㈡澘绉诲姩閫熷害
[SerializeField] Transform CopyOfThePanel;
- [SerializeField] Transform m_ContainerBossList;
[SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;
- [SerializeField] Transform CopyOfThePosition1;
- [SerializeField] Transform CopyOfThePosition2;
[SerializeField] IntensifySmoothSlider _ExpSlider;//缁忛獙鏉�
[SerializeField] Button _DownButton;//鏌ョ湅缁忛獙鏁板��
@@ -99,7 +94,6 @@
public static event Action<bool> IsCopyOfThePanel;
public static event Action IsOpenMaininterface;
- public static bool CopyOfThePositionBool = true;
RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
PlayerMountDatas horsemodel { get { return ModelCenter.Instance.GetModel<PlayerMountDatas>(); } }
@@ -241,16 +235,7 @@
}
if (mapId != PlayerDatas.Instance.baseData.MapID)
{
- CopyOfThePanel.localPosition = CopyOfThePosition2.localPosition;
- onMainModel.MainTopPanelShow = false;
- CopyOfThePositionBool = false;
- m_ContainerBossList.localPosition = CopyOfThePosition1.localPosition;
- m_BossBriefInfos.Unfold(false);
-
- if (Event_Duplicates != null)
- {
- Event_Duplicates(false, CopyOfThePanelSpeed);
- }
+ SetTipPanelOrBossList(false,false);
}
if (m_AnimationFadeOut.GetIsFadeIn() && mapId != PlayerDatas.Instance.baseData.MapID)
{
@@ -293,37 +278,15 @@
{
if (mapId != PlayerDatas.Instance.baseData.MapID)
{
- CopyOfThePanel.localPosition = CopyOfThePosition2.localPosition;
- onMainModel.MainTopPanelShow = false;
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(false);
- }
- CopyOfThePositionBool = false;
- m_ContainerBossList.localPosition = CopyOfThePosition1.localPosition;
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(false, false);
}
}
else
{
if (!IsBossBool)
{
- CopyOfThePanel.localPosition = CopyOfThePosition1.localPosition;
- onMainModel.MainTopPanelShow = true;
- CopyOfThePositionBool = true;
- m_ContainerBossList.localPosition = CopyOfThePosition2.localPosition;
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(true,false);
}
- }
-
- if (Event_Duplicates != null && (inDungeon || isNeutralMap))
- {
- Event_Duplicates(true, CopyOfThePanelSpeed);
- }
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 2)
- {
- CopyOfThePositionBool = true;
- m_ContainerBossList.localPosition = CopyOfThePosition2.localPosition;
}
m_FunctionForecastTip.gameObject.SetActive(true);
}
@@ -434,7 +397,7 @@
TaskSwithButton();
onMainModel.IsBossAreaTask = true;
}
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 5)
+ if (m_MainPositionTween.IsSetCopyOfThePanelShow)
{
if (NewBieCenter.Instance.inGuiding)
{
@@ -457,16 +420,9 @@
if (_areaType == MapArea.E_Type.Boss && !_enter)
{
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon && !isNeutralMap)
+ if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon && !isNeutralMap)
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- onMainModel.MainTopPanelShow = true;
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(true,true);
}
}
}
@@ -573,30 +529,13 @@
{
if (inDungeon || IsBossBool || isNeutralMap)
{
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(false);
- }
- if (Event_Duplicates != null && inDungeon)
- {
- Event_Duplicates(false, CopyOfThePanelSpeed);
- }
- onMainModel.MainTopPanelShow = false;
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(false,true);
}
if (!IsBossBool)
{
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
+ if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
{
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(true,true);
}
}
m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
@@ -660,32 +599,13 @@
{
if (inDungeon || IsBossBool || isNeutralMap)
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- onMainModel.MainTopPanelShow = true;
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
-
- if (Event_Duplicates != null && inDungeon)
- {
- Event_Duplicates(true, CopyOfThePanelSpeed);
- }
+ SetTipPanelOrBossList(true,true);
}
if (!IsBossBool)
{
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
+ if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- onMainModel.MainTopPanelShow = true;
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
+ SetTipPanelOrBossList(true, true);
}
}
m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
@@ -699,32 +619,14 @@
{
if (inDungeon || IsBossBool || isNeutralMap)
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- onMainModel.MainTopPanelShow = false;
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(false);
- }
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
-
- if (Event_Duplicates != null && inDungeon)
- {
- Event_Duplicates(false, CopyOfThePanelSpeed);
- }
+ SetTipPanelOrBossList(false,true);
}
if (!IsBossBool)
{
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
+ if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
- }
+ SetTipPanelOrBossList(true, true);
+ }
}
m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
m_CastSkillTip.DOLocalMoveX(m_position1_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
@@ -837,16 +739,9 @@
TaskSwithButton();
onMainModel.IsBossAreaTask = false;
}
- if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)//涓婂眰闈㈡澘
+ if (!m_MainPositionTween.IsSetCopyOfThePanelShow)//涓婂眰闈㈡澘
{
- CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
- onMainModel.MainTopPanelShow = true;
- m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
- m_BossBriefInfos.Unfold(false);
- if (IsCopyOfThePanel != null)
- {
- IsCopyOfThePanel(true);
- }
+ SetTipPanelOrBossList(true,true);
}
m_HighSettingTip.ShowButtonNow();
}
@@ -999,10 +894,50 @@
}
}
}
+ 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.CopyOfThePanelSpeed);
+ }
+ 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.CopyOfThePanelSpeed);
+ }
+ onMainModel.MainTopPanelShow = false;
+ if (_isTween)
+ {
+ m_MainPositionTween.SetTipAndBossTweenPos(false);
+ }
+ else
+ {
+ m_MainPositionTween.SetTipAndBossPos(false);
+ }
+ }
+ }
}
-
-}
-
-
-
-
+}
\ No newline at end of file
--
Gitblit v1.8.0