| | |
| | | [SerializeField] Transform unctionForecastPosition1;
|
| | | [SerializeField] Transform unctionForecastPosition2;
|
| | |
|
| | | [SerializeField] Button m_CollectBtn;
|
| | | [SerializeField] Image m_CollectIcon;
|
| | | [SerializeField] Text m_CollectBtnText;
|
| | | [SerializeField] MainCollectBehaviour m_CollectBehaviour;
|
| | | [SerializeField] Button m_RedBag;//红包入口按钮
|
| | | [SerializeField] UIEffect m_RedpackGetSfx;
|
| | | [SerializeField] Button m_SendRedbagBtn;
|
| | |
| | | [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
|
| | |
|
| | | [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
|
| | | private int m_CollectNPCID;
|
| | | private uint m_CollectNPCSID;
|
| | | private bool TaskSwithBool = true;
|
| | |
|
| | | [SerializeField] Button _SwitchShowBtn;//切换按钮
|
| | |
| | | GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
|
| | | NewBieCenter.Instance.guideCompletedEvent += OnGuideCompleted;
|
| | | m_CollectBtn.AddListener(OnCollectBtnClick);
|
| | | GA_NpcCollect.OnArrive += OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave += OnLeaveCollectNpc;
|
| | | PlayerRedPacketDatas.OnRedBagGetEvent += OnRedBagGet;
|
| | |
| | | m_TeamInvitationEntrance.UnInit();
|
| | | m_FairyCallBehaviour.UnInit();
|
| | | m_FairyLeagueRemind.UnInit();
|
| | | m_CollectBehaviour.Dispose();
|
| | | horseRidBool = false;
|
| | | purchaseModel.UpdateNewMysticalEvent -= UpdateMysticalPurchaseImag;
|
| | | assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
|
| | |
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FunctionForecastWin>();
|
| | | }
|
| | | m_CollectBtn.RemoveAllListeners();
|
| | | GA_NpcCollect.OnArrive -= OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave -= OnLeaveCollectNpc;
|
| | | fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
|
| | | wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
|
| | | m_CollectBtn.gameObject.SetActive(false);
|
| | | m_CollectBehaviour.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | private void GuideBeginEvent()
|
| | |
| | | if ((_areaType == MapArea.E_Type.Neutral || _areaType == MapArea.E_Type.Boss) && _enter)
|
| | | {
|
| | | WindowCenter.Instance.Open<NeutralMarkWin>();
|
| | | 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;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (atkInt.Length > 1 && Buffmodel.PkType != 5)
|
| | | {
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)5);
|
| | | }
|
| | | }
|
| | | |
| | | AtkTypeChange();
|
| | | }
|
| | |
|
| | | if (_areaType == MapArea.E_Type.Neutral && !_enter)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void AtkTypeChange()//骑宠争夺是否切换状态
|
| | | {
|
| | | 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))
|
| | | {
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | if (fairyGrabBossModel.grabBossHintOpen && atkInt.Length > 1 && Buffmodel.PkType != 5)
|
| | | {
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)5);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | private void OnMaininterCDTime()
|
| | | {
|
| | | MarkRayButton();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void OnCollectBtnClick()
|
| | | {
|
| | | if (m_CollectNPCID != 0 && m_CollectNPCSID != 0)
|
| | | {
|
| | | NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, m_CollectNPCID, m_CollectNPCSID);
|
| | | }
|
| | | }
|
| | |
|
| | | void OnArriveCollectNPC(uint sid, int npcID)
|
| | | {
|
| | | m_CollectNPCID = npcID;
|
| | | m_CollectNPCSID = sid;
|
| | | m_CollectBtn.gameObject.SetActive(true);
|
| | | var mapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | m_CollectIcon.SetSprite(mapId == 31230 ? "TY_UI_8" : "TY_UI_6");
|
| | | m_CollectIcon.SetNativeSize();
|
| | | m_CollectBtnText.text = mapId == 31230 ? Language.Get("Collect_FairyFeast") : Language.Get("Collect_Normal");
|
| | | m_CollectBehaviour.gameObject.SetActive(true);
|
| | | m_CollectBehaviour.Display(npcID, sid);
|
| | | }
|
| | |
|
| | | void OnLeaveCollectNpc(uint sid, int npcID)
|
| | | {
|
| | | if (m_CollectNPCID == npcID && m_CollectNPCSID == sid)
|
| | | {
|
| | | m_CollectNPCID = 0;
|
| | | m_CollectNPCSID = 0;
|
| | | }
|
| | | m_CollectBtn.gameObject.SetActive(false);
|
| | | m_CollectBehaviour.Dispose();
|
| | | m_CollectBehaviour.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | {
|
| | | IsShowTaskPanel();
|
| | | ShowFairyGrabBoss();
|
| | | AtkTypeChange();
|
| | | }
|
| | |
|
| | | private void ShowFairyGrabBoss()
|