From b68bf6efef97df1575e5c7e24ee89c172e285afb Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期六, 27 四月 2019 17:03:16 +0800
Subject: [PATCH] 3335 奇遇添加退出按钮
---
Fight/Stage/Dungeon/AdventureStage.cs | 11 +++++++++++
System/MainInterfacePanel/MainPositionTween.cs | 3 ++-
System/MainInterfacePanel/MapSwitchingBehaviour.cs | 2 +-
System/Dungeon/DungeonFightWin.cs | 20 ++++++++++++++++----
System/MainInterfacePanel/MainInterfaceWin.cs | 2 +-
5 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/Fight/Stage/Dungeon/AdventureStage.cs b/Fight/Stage/Dungeon/AdventureStage.cs
index 144e16f..2c1a718 100644
--- a/Fight/Stage/Dungeon/AdventureStage.cs
+++ b/Fight/Stage/Dungeon/AdventureStage.cs
@@ -11,6 +11,8 @@
private Vector3 m_CacheHeroPos;
private GA_NpcClientFunc m_Npc;
+ private bool dungeonFightWinOpenRecord = false;
+
public event Action onLoadAdventureStage;
public event Action onExitAdventureStage;
@@ -50,6 +52,11 @@
yield return null;
WindowCenter.Instance.Close<LoadingWin>();
WindowCenter.Instance.Open<MainInterfaceWin>();
+ dungeonFightWinOpenRecord = WindowCenter.Instance.IsOpen<DungeonFightWin>();
+ if (!dungeonFightWinOpenRecord)
+ {
+ WindowCenter.Instance.Open<DungeonFightWin>();
+ }
BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent;
BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
@@ -92,6 +99,10 @@
yield return null;
WindowCenter.Instance.Open<MainInterfaceWin>();
WindowCenter.Instance.Close<LoadingWin>();
+ if (!dungeonFightWinOpenRecord)
+ {
+ WindowCenter.Instance.Close<DungeonFightWin>();
+ }
if (onExitAdventureStage != null)
{
diff --git a/System/Dungeon/DungeonFightWin.cs b/System/Dungeon/DungeonFightWin.cs
index 37a3a6b..61f6d87 100644
--- a/System/Dungeon/DungeonFightWin.cs
+++ b/System/Dungeon/DungeonFightWin.cs
@@ -217,6 +217,18 @@
private void ExitDungeon()
{
+ if (AdventureStage.Instance.IsInAdventureStage)
+ {
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HazyExitAdventureConfirm"), (bool isOk) =>
+ {
+ if (isOk)
+ {
+ AdventureStage.Instance.Exit();
+ }
+ });
+ return;
+ }
+
var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
var config = DungeonOpenTimeConfig.Get(dataMapId);
string language = string.Empty;
@@ -362,6 +374,10 @@
{
if (immedidately)
{
+ m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition;
+ }
+ else
+ {
if (MainPositionTween.isDefaultState)
{
m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncBottom.localPosition.y, 1);
@@ -370,10 +386,6 @@
{
m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncUp.localPosition.y, 1);
}
- }
- else
- {
- m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition;
}
}
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index f70d515..f561691 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -145,7 +145,7 @@
}
var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
- if (isNeutralMap)
+ if (isNeutralMap && !AdventureStage.Instance.IsInAdventureStage)
{
m_BossBriefInfos.gameObject.SetActive(true);
if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID)
diff --git a/System/MainInterfacePanel/MainPositionTween.cs b/System/MainInterfacePanel/MainPositionTween.cs
index 76e3825..c21e874 100644
--- a/System/MainInterfacePanel/MainPositionTween.cs
+++ b/System/MainInterfacePanel/MainPositionTween.cs
@@ -109,7 +109,8 @@
m_ContainerBossList.gameObject.SetActive(isNeutralMap);
rightTopState = RightTopState.Function;
- if ((isDungeon || isNeutralMap || isBossArea) && !isGuiding && switchParams.showDefault)
+ if ((isDungeon || isNeutralMap || isBossArea || AdventureStage.Instance.IsInAdventureStage)
+ && !isGuiding && switchParams.showDefault)
{
rightTopState = RightTopState.Boss;
}
diff --git a/System/MainInterfacePanel/MapSwitchingBehaviour.cs b/System/MainInterfacePanel/MapSwitchingBehaviour.cs
index 38ef021..51dc800 100644
--- a/System/MainInterfacePanel/MapSwitchingBehaviour.cs
+++ b/System/MainInterfacePanel/MapSwitchingBehaviour.cs
@@ -29,7 +29,7 @@
public void Init()
{
int MapID = PlayerDatas.Instance.baseData.MapID;
- if (MapIdList.Contains(MapID))
+ if (MapIdList.Contains(MapID) && !AdventureStage.Instance.IsInAdventureStage)
{
m_Btn_MapSwitch.gameObject.SetActive(true);
}
--
Gitblit v1.8.0