| | |
| | | [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮
|
| | |
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | |
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | #region
|
| | | private int mapId = 0;
|
| | | public delegate void OnChatCallback();//聊天回调
|
| | |
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | m_SkillButtonEffects.Init();
|
| | | m_AnimationFadeOut.Init();
|
| | | m_TeamInvitationEntrance.Init();
|
| | | m_FairyCallBehaviour.Init();
|
| | | m_BossBriefInfos.gameObject.SetActive(false);
|
| | |
|
| | | ArticleExperience();//关于经验条
|
| | |
| | | PlayerTaskDatas.CompletionOfTaskEvent += CompletionOfTaskEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;
|
| | |
|
| | | fairyGrabBossModel.bossGrabHintEvent += bossGrabHintEvent;
|
| | | }
|
| | |
|
| | | private void CompletionOfTaskEvent(int obj)
|
| | |
| | | protected override void OnActived()
|
| | | {
|
| | | m_HighSettingTip.OnActived();
|
| | | IsShowTaskPanel();//是否显示任务面板
|
| | | }
|
| | |
|
| | | IEnumerator Co_Load()
|
| | |
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | { |
| | | {
|
| | | bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
|
| | | {
|
| | |
| | | var inDungeon = IsDungeon();
|
| | | if (inDungeon)
|
| | | {
|
| | | m_TaskAndTeamTip.SetActive(!inDungeon);
|
| | | m_FunctionForecastTip.gameObject.SetActive(false);
|
| | | if (WindowCenter.Instance.CheckOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | | if (mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | CopyOfThePanel.localPosition = CopyOfThePosition2.localPosition;
|
| | |
| | | }
|
| | | }
|
| | | else
|
| | | { |
| | | {
|
| | | var isNeutralMap = GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID);
|
| | |
|
| | | if (isNeutralMap)
|
| | | {
|
| | | m_BossBriefInfos.gameObject.SetActive(true);
|
| | | m_BossBriefInfos.Display(ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID));
|
| | | if (PlayerDatas.Instance.baseData.MapID==DogzDungeonModel.DATA_MAPID)
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses();
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | else
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | Event_Duplicates(true, CopyOfThePanelSpeed);
|
| | | }
|
| | |
|
| | | m_TaskAndTeamTip.SetActive(true);
|
| | | m_FunctionForecastTip.gameObject.SetActive(true);
|
| | | m_TaskSwithButton.gameObject.SetActive(true);
|
| | | }
|
| | | mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | m_HighSettingTip.AfterOpen();
|
| | | m_ChatTip.OnAfterOpen();
|
| | | HandleAchievement();
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | | m_FunctionForecastTip.Unit();
|
| | | m_AnimationFadeOut.Unit();
|
| | | m_TeamInvitationEntrance.UnInit();
|
| | | m_FairyCallBehaviour.UnInit();
|
| | | horseRidBool = false;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
|
| | |
| | | m_CollectBtn.RemoveAllListeners();
|
| | | GA_NpcCollect.OnArrive -= OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave -= OnLeaveCollectNpc;
|
| | | fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
|
| | | m_CollectBtn.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnEnterOrExitArea(MapArea.E_Type _areaType, bool _enter)
|
| | | {
|
| | | // DesignDebug.LogError(_areaType + ".." + _enter);
|
| | | // DesignDebug.LogError(_areaType + ".." + _enter);
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && _areaType != MapArea.E_Type.Boss && _enter)
|
| | | {
|
| | | if (Buffmodel.PkType != onMainModel.AreaState)
|
| | |
| | | int mapID = PlayerDatas.Instance.baseData.MapID;
|
| | | var config = Config.Instance.Get<MapConfig>(mapID);
|
| | | int[] atkInt = pKModel.GetArea(config.AtkType).ToArray();
|
| | | if (onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID) || fairyGrabBossModel.grabBossHintOpen)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (atkInt.Length > 1 && Buffmodel.PkType != 5)
|
| | | {
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | |
| | | if (!recordPositionBool)
|
| | | {
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | { |
| | | {
|
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | | IsCopyOfThePanel(false);
|
| | |
| | | }
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false); |
| | | m_BossBriefInfos.Unfold(false);
|
| | | }
|
| | | if (!IsBossBool)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
|
| | | { |
| | | {
|
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | | IsCopyOfThePanel(true);
|
| | |
| | | _MarkRay.gameObject.SetActive(false);
|
| | | }
|
| | | recordPositionBool = !recordPositionBool;
|
| | | }
|
| | |
|
| | | // 前期战斗用强制设置任务位置逻辑
|
| | | public void ForceShowTaskPanel()
|
| | | {
|
| | | if (onMainModel.IsBossAreaTask)
|
| | | {
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
|
| | | TaskSwithBool = !TaskSwithBool;
|
| | | }
|
| | |
|
| | | void ArticleExperience()//关于经验条
|
| | |
| | | _MarkRay.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | private void IsShowTaskPanel()//是否显示任务面板
|
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | if (inDungeon || fairyGrabBossModel.grabBossHintOpen)
|
| | | {
|
| | | m_TaskAndTeamTip.SetActive(false);
|
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TaskAndTeamTip.SetActive(true);
|
| | | m_TaskSwithButton.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | private void bossGrabHintEvent()
|
| | | {
|
| | | IsShowTaskPanel();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|