| | |
| | | [SerializeField] FunctionForecastTip m_FunctionForecastTip;//功能预告
|
| | | [SerializeField] IsShowXpButton m_IsShowXp;//XP 技能常显
|
| | | [SerializeField] SkillButtonEffects m_SkillButtonEffects;
|
| | | [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
|
| | |
|
| | | [SerializeField] Transform CopyOfThePanel;
|
| | | [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;
|
| | |
| | | [SerializeField] UIEffect m_UIEffect_B;//经验特效
|
| | | private float ExpValueFloat = 0;
|
| | | private bool SliderOpen = true;
|
| | | public float _Delaytime = 0.1f;//延迟时间
|
| | |
|
| | |
|
| | | [Header("技能面板和按钮面板的移动速度")]
|
| | | public float SwitchSkillTipAndButtonTipSpeed = 0.2f;
|
| | | public static bool recordPositionBool = true;
|
| | |
|
| | | [Header("切换按钮旋转角度")]
|
| | | public Vector3 Vec3 = new Vector3(0f, 0f, 225f);
|
| | | [SerializeField] Transform m_ImageRotation;//切换滚动
|
| | |
|
| | | [SerializeField] GameObject m_TaskAndTeamTip;
|
| | | [SerializeField] GameObject LeftImage;
|
| | | [SerializeField] GameObject RightImg;
|
| | |
|
| | | [SerializeField] Button m_TaskSwithButton;//关于功能预告
|
| | |
|
| | | [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
|
| | |
|
| | | [SerializeField] Button m_TaskSwithButton;//关于功能预告 |
| | | [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
|
| | | private bool TaskSwithBool = true;
|
| | |
|
| | | [SerializeField] Button _SwitchShowBtn;//切换按钮
|
| | | [SerializeField] AnimationFadeOut m_AnimationFadeOut;
|
| | | [SerializeField] GameObject m_MailObj;//邮件显隐
|
| | | [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
|
| | | [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮 |
| | |
|
| | | [SerializeField] MainPositionTween m_MainPositionTween;
|
| | | [SerializeField] MainButtonMisc m_MainButtonMisc;
|
| | | #region
|
| | | private int mapId = 0;
|
| | | public delegate void OnChatCallback();//聊天回调
|
| | | public static event OnChatCallback Event_ChatCallback;
|
| | | public delegate void OnDuplicates(bool _bool, float _speed);
|
| | | public static event OnDuplicates Event_Duplicates;
|
| | | 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;
|
| | |
|
| | |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
|
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
|
| | |
|
| | | IceCrystalVeinModel iceCrystalVeinModel { get { return ModelCenter.Instance.GetModel<IceCrystalVeinModel>(); } }
|
| | | JadeDynastyTowerModel jadeDynastyTowerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | | #region Built-in
|
| | | private bool IsUpdateBool = true;
|
| | | protected override void BindController()
|
| | | {
|
| | | var inst = BossShowModel.Instance;
|
| | | m_MapSwitchingBehaviour.InitAwake();
|
| | | recordPositionBool = true;
|
| | | TaskSwithBool = true;
|
| | | m_MainPositionTween.SetTaskPos(true);
|
| | | m_MainPositionTween.SetFunctionForecastPos(true);
|
| | | m_MailObj.SetActive(true);
|
| | | var inst = BossShowModel.Instance;
|
| | | TaskSwithBool = true;
|
| | | LeftImage.SetActive(true);
|
| | | RightImg.SetActive(false);
|
| | | m_MailObj.SetActive(true); |
| | | ListBossMapId.Clear();
|
| | | string strBoss = FuncConfigConfig.Get("TaskRetract").Numerical1;
|
| | | string[] bossList = ConfigParse.GetMultipleStr(strBoss);//解析出数组|
|
| | | for (int i = 0; i < bossList.Length; i++)
|
| | | {
|
| | | ListBossMapId.Add(int.Parse(bossList[i]));
|
| | | }
|
| | |
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | } |
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | |
| | | fairyGrabBossModel.bossGrabHintEvent += bossGrabHintEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | | IsCrossServerOneVsOne();
|
| | |
|
| | | }
|
| | |
|
| | | private void CompletionOfTaskEvent(int obj)
|
| | | {
|
| | | EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);
|
| | |
|
| | | }
|
| | |
|
| | | |
| | | protected override void OnActived()
|
| | | {
|
| | | m_MainButtonMisc.OnActived();
|
| | |
| | | IsShowTaskPanel();//是否显示任务面板
|
| | | }
|
| | |
|
| | | IEnumerator Co_Load()
|
| | | {
|
| | | yield return null;
|
| | | WindowCenter.Instance.Open<OffLineOnHookWin>();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | var inDungeon = IsDungeon();
|
| | | if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
|
| | | var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool && !m_MainPositionTween.IsTaskAndPanelShow);
|
| | | var judge2 = mapId != PlayerDatas.Instance.baseData.MapID;
|
| | | if (judge1)
|
| | | {
|
| | |
|
| | | if (!m_MainPositionTween.IsTaskAndPanelShow)
|
| | | {
|
| | | TaskSwithButton();
|
| | | }
|
| | | TaskSwithButton();
|
| | | 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 (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | if (judge2)
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | SetTipPanelOrBossList(false, false);
|
| | | }
|
| | | if (mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | SetTipPanelOrBossList(false,false);
|
| | | }
|
| | | if (m_AnimationFadeOut.GetIsFadeIn() && mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | if (m_AnimationFadeOut.GetIsFadeIn() && judge2)
|
| | | {
|
| | | m_MailObj.SetActive(true);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(true);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_FunctionForecastTip.gameObject.SetActive(true);
|
| | | var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
|
| | |
|
| | | if (isNeutralMap)
|
| | |
| | | m_BossBriefInfos.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (isNeutralMap)
|
| | | if (isNeutralMap && judge2)
|
| | | {
|
| | | if (mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | SetTipPanelOrBossList(false, false);
|
| | | }
|
| | | SetTipPanelOrBossList(false, false);
|
| | | }
|
| | | else
|
| | | else if (!isNeutralMap && !IsBossBool)
|
| | | {
|
| | | if (!IsBossBool)
|
| | | {
|
| | | SetTipPanelOrBossList(true,false);
|
| | | }
|
| | | }
|
| | | m_FunctionForecastTip.gameObject.SetActive(true);
|
| | | SetTipPanelOrBossList(true, false);
|
| | | } |
| | | }
|
| | | mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | m_HighSettingTip.AfterOpen();
|
| | |
| | | PlayerTaskDatas.CompletionOfTaskEvent -= CompletionOfTaskEvent;
|
| | | NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
|
| | | }
|
| | |
|
| | | private void CompletionOfTaskEvent(int obj)
|
| | | {
|
| | | EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | private void secondEvent()
|
| | | {
|
| | | SetAtkType();
|
| | |
| | |
|
| | | private void GuideBeginEvent()
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding
|
| | | var judge = NewBieCenter.Instance.inGuiding
|
| | | && (NewBieCenter.Instance.currentGuide == 89
|
| | | || NewBieCenter.Instance.currentGuide == TrialDungeonModel.TRIALEXCHANGE_GUIDE))
|
| | | || NewBieCenter.Instance.currentGuide == TrialDungeonModel.TRIALEXCHANGE_GUIDE);
|
| | | if (judge)
|
| | | {
|
| | | UnFlodFunctionArea(true, 0);
|
| | | }
|
| | |
| | | {
|
| | | if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon && !isNeutralMap)
|
| | | {
|
| | | SetTipPanelOrBossList(true,true);
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | return;
|
| | |
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && Line != PlayerDatas.Instance.baseData.FBID)//逍遥城普通Boss区域处理
|
| | | {
|
| | |
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | return;
|
| | | }
|
| | | if (onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理
|
| | | if (!onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理
|
| | | {
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | private void OnMaininterCDTime()
|
| | | {
|
| | | MarkRayButton();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | |
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | if (PlayerDatas.Instance.hero != null
|
| | | var judge1 = PlayerDatas.Instance.hero != null
|
| | | && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
|
| | | && onMainModel.MoveBool)
|
| | | && onMainModel.MoveBool;
|
| | | var judge2 = WindowCenter.Instance.IsOpen<PathfindingIconWin>();
|
| | | if (judge1 && !judge2)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("PathfindingIconWin"))
|
| | | {
|
| | | WindowCenter.Instance.Open<PathfindingIconWin>(true);
|
| | | }
|
| | | WindowCenter.Instance.Open<PathfindingIconWin>(true);
|
| | | }
|
| | | else
|
| | | if (!judge1 && judge2)
|
| | | {
|
| | | onMainModel.MoveBool = false;
|
| | | if (WindowCenter.Instance.IsOpen("PathfindingIconWin"))
|
| | | {
|
| | | WindowCenter.Instance.Close<PathfindingIconWin>();
|
| | | }
|
| | | WindowCenter.Instance.Close<PathfindingIconWin>();
|
| | | }
|
| | | }
|
| | | public void MarkRayButton()
|
| | |
| | | {
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | {
|
| | | SetTipPanelOrBossList(false,true);
|
| | | SetTipPanelOrBossList(false, true);
|
| | | }
|
| | | if (!IsBossBool)
|
| | | {
|
| | | if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
|
| | | {
|
| | | SetTipPanelOrBossList(true,true);
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MailObj.SetActive(true);
|
| | | recordPositionBool = true;
|
| | | m_MainPositionTween.SetRotation(false);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | void TaskSwithButton()
|
| | | {
|
| | | if (onMainModel.IsBossAreaTask)
|
| | | {
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | var inDungeon = IsDungeon(); |
| | | if (TaskSwithBool)//隐藏
|
| | | {
|
| | | m_MainPositionTween.SetTaskPosTween(false);
|
| | | if (m_FunctionForecastTip.gameObject.activeSelf)
|
| | | if (!inDungeon)
|
| | | {
|
| | | m_MainPositionTween.SetFunctionForecastPosTween(false);
|
| | | }
|
| | | LeftImage.SetActive(false);
|
| | | RightImg.SetActive(true);
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | }
|
| | | else//显示
|
| | | {
|
| | | m_MainPositionTween.SetTaskPosTween(true);
|
| | | if (m_FunctionForecastTip.gameObject.activeSelf)
|
| | | if (!inDungeon)
|
| | | {
|
| | | m_MainPositionTween.SetFunctionForecastPosTween(true);
|
| | | }
|
| | | LeftImage.SetActive(true);
|
| | | RightImg.SetActive(false);
|
| | | }
|
| | | if (onMainModel.IsBossAreaTask)
|
| | | {
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | TaskSwithBool = !TaskSwithBool;
|
| | | }
|
| | |
| | | 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)//显示功能入口
|
| | | {
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | if (judge1)
|
| | | {
|
| | | SetTipPanelOrBossList(true,true);
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | if (!IsBossBool)
|
| | | if (judge2)
|
| | | {
|
| | | if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
|
| | | {
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MailObj.SetActive(false);
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(false);
|
| | | m_MainPositionTween.SetRotation(true);
|
| | | }
|
| | | else//显示默认
|
| | | {
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | if (judge1)
|
| | | {
|
| | | SetTipPanelOrBossList(false,true);
|
| | | SetTipPanelOrBossList(false, true);
|
| | | }
|
| | | if (!IsBossBool)
|
| | | if (judge2)
|
| | | {
|
| | | if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
|
| | | {
|
| | | SetTipPanelOrBossList(true, true);
|
| | | } |
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MailObj.SetActive(true);
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
|
| | | m_MainPositionTween.SetRotation(false);
|
| | | }
|
| | | recordPositionBool = !recordPositionBool;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | _ExpSlider.delay = _Delaytime;
|
| | | _ExpSlider.delay = 0.1f;
|
| | | }
|
| | | ExpValueFloat = ((float)nowVlaue / (float)maxValue);
|
| | | int MapID = PlayerDatas.Instance.baseData.MapID;
|
| | |
| | | }
|
| | | if (!m_MainPositionTween.IsSetCopyOfThePanelShow)//上层面板
|
| | | {
|
| | | SetTipPanelOrBossList(true,true);
|
| | | SetTipPanelOrBossList(true, true);
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | }
|
| | |
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
|
| | | {
|
| | | ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | } |
| | | if (_skillGroup != 0)
|
| | | {
|
| | | m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(false);
|
| | | m_MailObj.SetActive(false);
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MainPositionTween.SetRotation(true);
|
| | | recordPositionBool = false;
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | }
|
| | |
| | | {
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(true);
|
| | | m_MailObj.SetActive(true);
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MainPositionTween.SetRotation(false);
|
| | | recordPositionBool = true;
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | }
|
| | |
| | | private void IsShowTaskPanel()//是否显示任务面板
|
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | if (inDungeon || fairyGrabBossModel.grabBossHintOpen |
| | | || CrossServerUtility.IsCrossServer() |
| | | || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
|
| | | var judge = inDungeon || fairyGrabBossModel.grabBossHintOpen
|
| | | || CrossServerUtility.IsCrossServer()
|
| | | || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne;
|
| | | if (judge)
|
| | | {
|
| | | m_TaskAndTeamTip.SetActive(false);
|
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | |
| | | }
|
| | | private void IsCrossServerOneVsOne()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne() )//是否再跨服副本中
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())//是否再跨服副本中
|
| | | {
|
| | | WindowCenter.Instance.Open<FightingPKWin>();
|
| | | m_HeadPortraitTip.gameObject.SetActive(false);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | private void SetTipPanelOrBossList(bool _bool,bool _isTween)//顶层按钮组和boss列表的相互切换
|
| | | private void SetTipPanelOrBossList(bool _bool, bool _isTween)//顶层按钮组和boss列表的相互切换
|
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | m_BossBriefInfos.Unfold(false);
|
| | | if (_bool)
|
| | | { |
| | | {
|
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | | IsCopyOfThePanel(true);
|
| | |
| | | else
|
| | | {
|
| | | m_MainPositionTween.SetTipAndBossPos(true);
|
| | | } |
| | | }
|
| | | }
|
| | | else
|
| | | {
|