| | |
| | | [SerializeField] HighSettingTip m_HighSettingTip;
|
| | | [SerializeField] TaskListTip m_TaskListTip;//任务
|
| | | [SerializeField] TopRightTip m_TopRightTip;
|
| | |
|
| | | [SerializeField] Button friendQuestBtn;
|
| | | [SerializeField] Button fairyRequestBtn;
|
| | | [SerializeField] FunctionForecastTip m_FunctionForecastTip;//功能预告
|
| | | [SerializeField] IsShowXpButton m_IsShowXp;//XP 技能常显
|
| | | // [SerializeField] XpSkill m_XpSkill;
|
| | | [SerializeField] SkillButtonEffects m_SkillButtonEffects;
|
| | |
|
| | | [Header("副本面板移动速度")]
|
| | | public float CopyOfThePanelSpeed = 1f;//副本面板移动速度
|
| | | [SerializeField] Transform CopyOfThePanel;
|
| | | [SerializeField] Transform m_ContainerBossList;
|
| | | [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
|
| | | [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;
|
| | | [SerializeField] Transform CopyOfThePosition1;
|
| | | [SerializeField] Transform CopyOfThePosition2;
|
| | | [SerializeField] AnimationFadeOut m_AnimationFadeOut;
|
| | |
|
| | | [SerializeField] IntensifySmoothSlider _ExpSlider;//经验条
|
| | | [SerializeField] Button _DownButton;//查看经验数值
|
| | | [SerializeField] Text _ExpRate;//数值
|
| | | [SerializeField] UIEffect m_UIEffect_A;//经验特效
|
| | | [SerializeField] UIEffect m_UIEffect_B;//经验特效
|
| | | private float ExpValueFloat = 0;
|
| | | private bool SliderOpen = true;
|
| | | public float _Delaytime = 0.1f;//延迟时间
|
| | |
|
| | |
|
| | | [Header("任务面板的移动速度")]
|
| | | public float Speed = 0.2f;
|
| | | [Header("技能面板和按钮面板的移动速度")]
|
| | | public float SwitchSkillTipAndButtonTipSpeed = 0.2f;
|
| | | public float DoFade = 0.2f;
|
| | | [SerializeField] Transform m_LowSettingTipGroup;//按钮面板
|
| | | [SerializeField] Transform m_CastSkillTip;//技能面板
|
| | | [SerializeField] Transform m_position1_S;
|
| | | [SerializeField] Transform m_position2_S;
|
| | | 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] Transform m_TaskAndTeamPanel;
|
| | | [SerializeField] Transform TaskListTipAnchor1;
|
| | | [SerializeField] Transform TaskListTipAnchor2;
|
| | |
|
| | | [SerializeField] Button m_TaskSwithButton;//关于功能预告
|
| | | [SerializeField] Transform FunctionForecastPanel;
|
| | | [SerializeField] Transform unctionForecastPosition1;
|
| | | [SerializeField] Transform unctionForecastPosition2;
|
| | |
|
| | | [SerializeField] MainCollectBehaviour m_CollectBehaviour;
|
| | | [SerializeField] Button m_RedBag;//红包入口按钮
|
| | | [SerializeField] UIEffect m_RedpackGetSfx;
|
| | | [SerializeField] Button m_SendRedbagBtn;
|
| | | [SerializeField] Button WishingAwardImg;
|
| | | [SerializeField] Button MysticalPurchaseImg;
|
| | | [SerializeField] Button DungeonAssistImg;
|
| | | [SerializeField] RectTransform m_ContainerGotoGrabBoss;
|
| | | [SerializeField] RectTransform m_ContainerAdaptiveChat;
|
| | | [SerializeField] Button m_GotoFairyGrabBoss;
|
| | | [SerializeField] Button m_FlyToFairyGrabBoss;
|
| | | [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
|
| | |
|
| | | [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
|
| | | private bool TaskSwithBool = true;
|
| | |
|
| | | [SerializeField] Button _SwitchShowBtn;//切换按钮
|
| | | [SerializeField] AnimationFadeOut m_AnimationFadeOut;
|
| | |
|
| | | [SerializeField] Button m_TaskSwithButton;//关于功能预告 |
| | | [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
|
| | | [SerializeField] Transform CopyOfThePanel; |
| | | [SerializeField] GameObject m_TaskAndTeamTip;
|
| | | [SerializeField] GameObject m_MailObj;//邮件显隐
|
| | | [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮 |
| | |
|
| | | [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮
|
| | |
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | |
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
|
| | | [SerializeField] MainPositionTween m_MainPositionTween;
|
| | | [SerializeField] MainButtonMisc m_MainButtonMisc;
|
| | | #region
|
| | | private bool TaskSwithBool = true;
|
| | | private float ExpValueFloat = 0;
|
| | | private bool SliderOpen = true;
|
| | | public static bool recordPositionBool = true;
|
| | | 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;
|
| | | public static bool CopyOfThePositionBool = true;
|
| | |
|
| | | RealmModel m_RealmModel;
|
| | | RealmModel realmModel { get { return m_RealmModel ?? (m_RealmModel = ModelCenter.Instance.GetModel<RealmModel>()); } }
|
| | | FairyModel m_FairyModel;
|
| | | FairyModel fairyModel { get { return m_FairyModel ?? (m_FairyModel = ModelCenter.Instance.GetModel<FairyModel>()); } }
|
| | | FriendsModel _friendsModel;
|
| | | FriendsModel friendsModel { get { return _friendsModel ?? (_friendsModel = ModelCenter.Instance.GetModel<FriendsModel>()); } }
|
| | | PlayerMountDatas m_HorseModel;
|
| | | PlayerMountDatas horsemodel { get { return m_HorseModel ?? (m_HorseModel = ModelCenter.Instance.GetModel<PlayerMountDatas>()); } }
|
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | PlayerTaskDatas m_PlayerTask;
|
| | | PlayerTaskDatas onPlayerTask { get { return m_PlayerTask ?? (m_PlayerTask = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } }
|
| | | PlayerRedPacketDatas m_RedPacket;
|
| | | PlayerRedPacketDatas redPacket { get { return m_RedPacket ?? (m_RedPacket = ModelCenter.Instance.GetModel<PlayerRedPacketDatas>()); } }
|
| | | PlayerBuffDatas m_BuffModel;
|
| | | PlayerBuffDatas Buffmodel { get { return m_BuffModel ?? (m_BuffModel = ModelCenter.Instance.GetModel<PlayerBuffDatas>()); } }
|
| | | PKModel m_PKModel;
|
| | | PKModel pKModel { get { return m_PKModel ?? (m_PKModel = ModelCenter.Instance.GetModel<PKModel>()); } }
|
| | | OSRedEnvelopeModel OSEnvelopeModel { get { return ModelCenter.Instance.GetModel<OSRedEnvelopeModel>(); } }
|
| | | FestivalRedpackModel festivalRedpackModel { get { return ModelCenter.Instance.GetModel<FestivalRedpackModel>(); } }
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | | PlayerMountDatas horsemodel { get { return ModelCenter.Instance.GetModel<PlayerMountDatas>(); } }
|
| | | PlayerMainDate onMainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
|
| | | PlayerTaskDatas onPlayerTask { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
|
| | | PlayerBuffDatas Buffmodel { get { return ModelCenter.Instance.GetModel<PlayerBuffDatas>(); } }
|
| | | PKModel pKModel { get { return ModelCenter.Instance.GetModel<PKModel>(); } }
|
| | | RuneTowerModel runeTowerModel { get { return ModelCenter.Instance.GetModel<RuneTowerModel>(); } }
|
| | | 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>(); } }
|
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
|
| | | WishingPoolModel wishModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
|
| | | MysticalPurchaseModel purchaseModel { get { return ModelCenter.Instance.GetModel<MysticalPurchaseModel>(); } }
|
| | | DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
|
| | | IceCrystalVeinModel m_IceCrystalVeinModel;
|
| | | IceCrystalVeinModel iceCrystalVeinModel { get { return m_IceCrystalVeinModel ?? (m_IceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>()); } }
|
| | | 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;
|
| | | m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_MailObj.SetActive(true);
|
| | | var inst = BossShowModel.Instance;
|
| | | TaskSwithBool = true;
|
| | | FunctionForecastPanel.localPosition = unctionForecastPosition1.localPosition;
|
| | | LeftImage.SetActive(true);
|
| | | RightImg.SetActive(false);
|
| | | m_MainPositionTween.SetTaskPos(true);
|
| | | m_MainPositionTween.SetFunctionForecastPos(true);
|
| | | 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()
|
| | |
| | | UIEventTrigger.Get(_DownButton.gameObject).OnDown = DownButton;
|
| | | UIEventTrigger.Get(_DownButton.gameObject).OnUp = UpButton;
|
| | | _MarkRay.AddListener(MarkRayButton);
|
| | | _SwitchShowBtn.AddListener(SwitchShowButton);
|
| | | m_TaskSwithButton.AddListener(TaskSwithButton);
|
| | | fairyRequestBtn.onClick.AddListener(OnFairyRequestClick);
|
| | | m_RedBag.AddListener(RedPacketButton);
|
| | | m_SendRedbagBtn.AddListener(SendRedpacketBtn);
|
| | | WishingAwardImg.AddListener(ClickWishAward);
|
| | | MysticalPurchaseImg.AddListener(ClickMysticalPurchase);
|
| | | DungeonAssistImg.AddListener(ClickDungeonAssist);
|
| | | m_GotoFairyGrabBoss.AddListener(GotoFairyGrabBoss);
|
| | | m_FlyToFairyGrabBoss.AddListener(FlyToFairyGrabBoss);
|
| | | _SwitchShowBtn.SetListener(SwitchShowButton);
|
| | | m_TaskSwithButton.SetListener(TaskSwithButton);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | }
|
| | | IsUpdateBool = true;
|
| | | SliderOpen = true;
|
| | | horseRidBool = false;
|
| | | friendsModel.askAddFriendEvent = FriendQuestBtn;
|
| | | m_InGamePusher.Init();
|
| | | m_SkillContainer.Init();
|
| | | m_FunctionForecastTip.Init();
|
| | |
| | | m_FairyCallBehaviour.Init();
|
| | | m_MapSwitchingBehaviour.Init();
|
| | | m_FairyLeagueRemind.Init();
|
| | | m_MainButtonMisc.Init();
|
| | | m_BossBriefInfos.gameObject.SetActive(false);
|
| | | UpdateWishAwardImag();
|
| | | UpdateMysticalPurchaseImag();
|
| | | UpdateDungeonAssistImag();
|
| | | ArticleExperience();//关于经验条
|
| | | FriendQuestBtn();
|
| | | UpdateFairyRequest();
|
| | | OnRedBagGet();//关于红包入口
|
| | | CheckSendRedpackBtn();
|
| | | CheckChatTipOpen();
|
| | | ShowFairyGrabBoss();
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
|
| | | fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
|
| | | GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
|
| | | NewBieCenter.Instance.guideCompletedEvent += OnGuideCompleted;
|
| | | GA_NpcCollect.OnArrive += OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave += OnLeaveCollectNpc;
|
| | | PlayerRedPacketDatas.OnRedBagGetEvent += OnRedBagGet;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += WindowAfterEvent;
|
| | | OSEnvelopeModel.OSRedEnvelopeUpdateEvent += OnRedBagGet;
|
| | | OSEnvelopeModel.OSRedEnvelopeInfoEnvent += OnRedBagGet;
|
| | | PlayerTaskDatas.CompletionOfTaskEvent += CompletionOfTaskEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;
|
| | | fairyGrabBossModel.bossGrabHintEvent += bossGrabHintEvent;
|
| | | wishModel.UpdateWishAwardEvent += UpdateWishAwardImag;
|
| | | assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
|
| | | purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
|
| | | fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
|
| | | ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
|
| | | 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();
|
| | | m_HighSettingTip.OnActived();
|
| | | IsShowTaskPanel();//是否显示任务面板
|
| | | RefreshAdaptiveChat();
|
| | | }
|
| | |
|
| | | 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区域
|
| | | if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
|
| | | var inDungeon = IsDungeon();
|
| | | var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool && !m_MainPositionTween.IsTaskAndPanelShow);
|
| | | var judge2 = mapId != PlayerDatas.Instance.baseData.MapID;
|
| | | if (judge1)
|
| | | {
|
| | |
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 3)
|
| | | {
|
| | | TaskSwithButton();
|
| | | }
|
| | | TaskSwithButton();
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | onMainModel.IsDead = false;
|
| | | }
|
| | |
| | | {
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | }
|
| | | var inDungeon = IsDungeon();
|
| | | 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)
|
| | | if (m_AnimationFadeOut.GetIsFadeIn() && judge2)
|
| | | {
|
| | | 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);
|
| | | }
|
| | | }
|
| | | if (m_AnimationFadeOut.GetIsFadeIn() && mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | m_AnimationFadeOut.FadeAtOnce();
|
| | | m_MailObj.SetActive(true);
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(true);
|
| | | recordPositionBool = 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)
|
| | | {
|
| | | 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
|
| | | else if (!isNeutralMap && !IsBossBool)
|
| | | {
|
| | | if (!IsBossBool)
|
| | | {
|
| | | CopyOfThePanel.localPosition = CopyOfThePosition1.localPosition;
|
| | | onMainModel.MainTopPanelShow = true;
|
| | | CopyOfThePositionBool = true;
|
| | | m_ContainerBossList.localPosition = CopyOfThePosition2.localPosition;
|
| | | m_BossBriefInfos.Unfold(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);
|
| | | SetTipPanelOrBossList(true, false);
|
| | | } |
| | | }
|
| | | mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | m_HighSettingTip.AfterOpen();
|
| | |
| | | m_TeamInvitationEntrance.UnInit();
|
| | | m_FairyCallBehaviour.UnInit();
|
| | | m_FairyLeagueRemind.UnInit();
|
| | | m_CollectBehaviour.Dispose();
|
| | | horseRidBool = false;
|
| | | purchaseModel.UpdateNewMysticalEvent -= UpdateMysticalPurchaseImag;
|
| | | assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
|
| | | m_MainButtonMisc.Unit();
|
| | |
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
|
| | | fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
|
| | | GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
|
| | | NewBieCenter.Instance.guideCompletedEvent -= OnGuideCompleted;
|
| | | PlayerRedPacketDatas.OnRedBagGetEvent -= OnRedBagGet;
|
| | | WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterEvent;
|
| | | OSEnvelopeModel.OSRedEnvelopeUpdateEvent -= OnRedBagGet;
|
| | | OSEnvelopeModel.OSRedEnvelopeInfoEnvent -= OnRedBagGet;
|
| | | PlayerTaskDatas.CompletionOfTaskEvent -= CompletionOfTaskEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
|
| | | fairyGrabBossModel.gotoBossStateUpdate -= ShowFairyGrabBoss;
|
| | | ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | GA_NpcCollect.OnArrive -= OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave -= OnLeaveCollectNpc;
|
| | | fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
|
| | | wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
|
| | | m_CollectBehaviour.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | var judge1 = PlayerDatas.Instance.hero != null
|
| | | && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
|
| | | && onMainModel.MoveBool;
|
| | | var judge2 = WindowCenter.Instance.IsOpen<PathfindingIconWin>();
|
| | | if (judge1 && !judge2)
|
| | | {
|
| | | WindowCenter.Instance.Open<PathfindingIconWin>(true);
|
| | | }
|
| | | if (!judge1 && judge2)
|
| | | {
|
| | | onMainModel.MoveBool = false;
|
| | | WindowCenter.Instance.Close<PathfindingIconWin>();
|
| | | }
|
| | | }
|
| | | |
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | #endregion
|
| | | private void CompletionOfTaskEvent(int obj)
|
| | | {
|
| | | EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);
|
| | | }
|
| | |
|
| | | private void secondEvent()
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (_id == OSEnvelopeModel.m_RedAchieveRedpoint.id
|
| | | || _id == festivalRedpackModel.taskRedpoint.id)
|
| | | {
|
| | | CheckSendRedpackBtn();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRedBagGet()//判断是否开启红包入口
|
| | | {
|
| | | if (m_RedpackGetSfx.IsPlaying)
|
| | | {
|
| | | m_RedpackGetSfx.StopImediatly();
|
| | | }
|
| | | var requireRedpack = (OSEnvelopeModel.CanGetEnvelope()
|
| | | || redPacket.IsRedBagGetBool || festivalRedpackModel.ExistRewardableRedpack())
|
| | | && !CrossServerUtility.IsCrossServer();
|
| | | if (requireRedpack)
|
| | | {
|
| | | m_RedBag.gameObject.SetActive(true);
|
| | | if (!m_RedpackGetSfx.IsPlaying)
|
| | | {
|
| | | m_RedpackGetSfx.Play();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RedBag.gameObject.SetActive(false);
|
| | | }
|
| | | CheckSendRedpackBtn();
|
| | | }
|
| | |
|
| | | private void CheckSendRedpackBtn()
|
| | | {
|
| | | m_SendRedbagBtn.gameObject.SetActive(!m_RedBag.gameObject.activeSelf && OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple
|
| | | && festivalRedpackModel.taskRedpoint.state == RedPointState.Simple);
|
| | | }
|
| | |
|
| | | private void OnGuideBegin()//引导开始
|
| | | {
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)
|
| | | if (!m_MainPositionTween.IsTaskAndPanelShow)
|
| | | {
|
| | | TaskSwithButton();
|
| | | }
|
| | |
| | |
|
| | | if (_areaType == MapArea.E_Type.Boss && _enter)
|
| | | {
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) < 2 && ListBossMapId.Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | if (m_MainPositionTween.IsTaskAndPanelShow && ListBossMapId.Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | {
|
| | | TaskSwithButton();
|
| | | onMainModel.IsBossAreaTask = true;
|
| | | }
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 5)
|
| | | if (m_MainPositionTween.IsSetCopyOfThePanelShow)
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | 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特殊处理
|
| | | {
|
| | |
|
| | | }
|
| | | else
|
| | | if (!onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理
|
| | | {
|
| | | if (IsBossBool && atkInt.Length > 1 && Buffmodel.PkType != 5)
|
| | | {
|
| | |
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)5);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void SetAtkType()//逍遥城非boss区域特殊处理
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | private void OnMaininterCDTime()
|
| | | {
|
| | | MarkRayButton();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | private Vector2 startPosition;
|
| | | private Vector2 endPosition;
|
| | | private bool horseRidBool = false;
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | if (PlayerDatas.Instance.hero != null
|
| | | && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
|
| | | && onMainModel.MoveBool)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("PathfindingIconWin"))
|
| | | {
|
| | | WindowCenter.Instance.Open<PathfindingIconWin>(true);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | onMainModel.MoveBool = false;
|
| | | if (WindowCenter.Instance.IsOpen("PathfindingIconWin"))
|
| | | {
|
| | | WindowCenter.Instance.Close<PathfindingIconWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public void FriendQuestBtn()
|
| | | {
|
| | | if(CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | friendQuestBtn.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Friend))
|
| | | {
|
| | | friendQuestBtn.onClick.RemoveAllListeners();
|
| | | if (friendsModel.GetFriendQuestDict().Count > 0)
|
| | | {
|
| | | friendQuestBtn.gameObject.SetActive(true);
|
| | | friendQuestBtn.onClick.AddListener(OnClickFriendQuest);
|
| | | }
|
| | | else
|
| | | {
|
| | | friendQuestBtn.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | friendQuestBtn.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFairyRequestClick()
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyInviteWin>();
|
| | | }
|
| | | private void RedPacketButton()//关于红包的功能 入口
|
| | | {
|
| | | RedEnvelopeModel envelopeModel = ModelCenter.Instance.GetModel<RedEnvelopeModel>();
|
| | | RedEnvelopeModel.RedEnvelope _envelope;
|
| | | if (envelopeModel.TryGetLatestEnvelope(out _envelope))
|
| | | {
|
| | | if (festivalRedpackModel.systemRedpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | festivalRedpackModel.jumpType = 1;
|
| | | festivalRedpackModel.autoOpen = true;
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
|
| | | }
|
| | | else if (festivalRedpackModel.receiveRedpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | festivalRedpackModel.jumpType = 3;
|
| | | festivalRedpackModel.autoOpen = true;
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
|
| | | }
|
| | | else if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
|
| | | ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().autoOpen = true;
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RedPacket);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SendRedpacketBtn()
|
| | | {
|
| | | if (festivalRedpackModel.taskRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | festivalRedpackModel.jumpType = 2;
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
|
| | | }
|
| | | else if (OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 1;
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickWishAward()
|
| | | {
|
| | | WindowCenter.Instance.Open<WishingGetItemWin>();
|
| | | }
|
| | |
|
| | | private void ClickMysticalPurchase()
|
| | | {
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>(false, (int)OpenServerActivityCenter.OSActivityType.MysticalPurchase);
|
| | | }
|
| | |
|
| | | private void ClickDungeonAssist()
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonAssistWin>();
|
| | | }
|
| | |
|
| | | private void UpdateDungeonAssistImag()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | DungeonAssistImg.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | DungeonAssistImg.gameObject.SetActive(assistModel.IsNewAssistInfo);
|
| | | }
|
| | |
|
| | | private void UpdateMysticalPurchaseImag()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | MysticalPurchaseImg.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | MysticalPurchaseImg.gameObject.SetActive(purchaseModel.priorityOpen);
|
| | | }
|
| | |
|
| | | private void UpdateWishAwardImag()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | WishingAwardImg.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | WishingAwardImg.gameObject.SetActive(wishModel.wishingAwardDict.Count > 0 ? true : false);
|
| | | }
|
| | |
|
| | | private void UpdateFairyRequest()
|
| | | {
|
| | | fairyRequestBtn.gameObject.SetActive(fairyModel.FairyRequestRedPoint.count > 0);
|
| | | }
|
| | |
|
| | | private void OnClickFriendQuest()
|
| | | {
|
| | | WindowCenter.Instance.Open<FriendQuestWin>();
|
| | | }
|
| | |
|
| | | |
| | | public void MarkRayButton()
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding)
|
| | |
| | | {
|
| | | 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);
|
| | | m_CastSkillTip.DOLocalMoveX(m_position1_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, DoFade);
|
| | | m_MailObj.SetActive(true);
|
| | | m_AnimationFadeOut.FadeOut();
|
| | | recordPositionBool = true;
|
| | | m_MainPositionTween.SetRotation(false);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
|
| | | }
|
| | | }
|
| | |
|
| | | void DownButton(GameObject go)
|
| | | {
|
| | | _ExpRate.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | void UpButton(GameObject go)
|
| | | {
|
| | | _ExpRate.gameObject.SetActive(false);
|
| | |
| | |
|
| | | void TaskSwithButton()
|
| | | {
|
| | | if (onMainModel.IsBossAreaTask)
|
| | | {
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | var inDungeon = IsDungeon(); |
| | | if (TaskSwithBool)//隐藏
|
| | | {
|
| | | m_TaskAndTeamPanel.DOLocalMoveX(TaskListTipAnchor2.localPosition.x, Speed);
|
| | | if (m_FunctionForecastTip.gameObject.activeSelf)
|
| | | m_MainPositionTween.SetTaskPosTween(false);
|
| | | if (!inDungeon)
|
| | | {
|
| | | FunctionForecastPanel.DOLocalMoveX(unctionForecastPosition2.localPosition.x, Speed);
|
| | |
|
| | | }
|
| | | LeftImage.SetActive(false);
|
| | | RightImg.SetActive(true);
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | m_MainPositionTween.SetFunctionForecastPosTween(false);
|
| | | }
|
| | | }
|
| | | else//显示
|
| | | {
|
| | | m_TaskAndTeamPanel.DOLocalMoveX(TaskListTipAnchor1.localPosition.x, Speed);
|
| | | if (m_FunctionForecastTip.gameObject.activeSelf)
|
| | | m_MainPositionTween.SetTaskPosTween(true);
|
| | | if (!inDungeon)
|
| | | {
|
| | | FunctionForecastPanel.DOLocalMoveX(unctionForecastPosition1.localPosition.x, Speed);
|
| | | 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)
|
| | | {
|
| | | 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 (judge2)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !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);
|
| | | m_CastSkillTip.DOLocalMoveX(m_position2_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(0, DoFade);
|
| | | m_MailObj.SetActive(false);
|
| | | m_AnimationFadeOut.FadeIn();
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(false);
|
| | | m_MainPositionTween.SetRotation(true);
|
| | | }
|
| | | else//显示默认
|
| | | {
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | if (judge1)
|
| | | {
|
| | | 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 (judge2)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !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);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, DoFade);
|
| | | m_MailObj.SetActive(true);
|
| | | m_AnimationFadeOut.FadeOut();
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
|
| | | m_MainPositionTween.SetRotation(false);
|
| | | }
|
| | | recordPositionBool = !recordPositionBool;
|
| | | }
|
| | |
| | | {
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
|
| | | m_MainPositionTween.SetTaskPos(true);
|
| | | TaskSwithBool = !TaskSwithBool;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | _ExpSlider.delay = _Delaytime;
|
| | | _ExpSlider.delay = 0.1f;
|
| | | }
|
| | | ExpValueFloat = ((float)nowVlaue / (float)maxValue);
|
| | | int MapID = PlayerDatas.Instance.baseData.MapID;
|
| | |
| | | IsCrossServerOneVsOne();
|
| | | }
|
| | | }
|
| | |
|
| | | void OnArriveCollectNPC(uint sid, int npcID)
|
| | | {
|
| | | m_CollectBehaviour.gameObject.SetActive(true);
|
| | | m_CollectBehaviour.Display(npcID, sid);
|
| | | }
|
| | |
|
| | | void OnLeaveCollectNpc(uint sid, int npcID)
|
| | | {
|
| | | m_CollectBehaviour.Dispose();
|
| | | m_CollectBehaviour.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | |
| | |
|
| | | private bool IsDungeon()
|
| | | {
|
| | |
| | | {
|
| | | if (_unflod)
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展开状态
|
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板展开状态
|
| | | {
|
| | | ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
|
| | | }
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)//任务面板
|
| | | if (!m_MainPositionTween.IsTaskAndPanelShow)//任务面板
|
| | | {
|
| | | 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();
|
| | | }
|
| | | else
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
|
| | | {
|
| | | ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | } |
| | | if (_skillGroup != 0)
|
| | | {
|
| | | m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
|
| | | {
|
| | | ShowCastSkill();//显示技能组隐藏按钮组(强制切换)
|
| | | }
|
| | |
| | |
|
| | | public void IsShowButtonGroup()
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展示
|
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板展示
|
| | | {
|
| | | ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
|
| | | }
|
| | |
| | |
|
| | | private void ShowBtnGroup()//显示按钮组,隐藏技能组(强制切换)
|
| | | {
|
| | | m_AnimationFadeOut.ImmediatelyAppear();//按钮组立即出现
|
| | | m_CastSkillTip.localPosition = m_position2_S.localPosition;//技能面板切出
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(false);
|
| | | m_MailObj.SetActive(false);
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | m_MainPositionTween.SetRotation(true);
|
| | | recordPositionBool = false;
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | private void ShowCastSkill()//显示技能组,隐藏按钮组(强制切换)
|
| | | {
|
| | | m_AnimationFadeOut.FadeAtOnce();//功能面板立刻隐藏
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;//技能面板立即出现
|
| | | m_MainPositionTween.SetSkillTipOrRightTipPos(true);
|
| | | m_MailObj.SetActive(true);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | 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);
|
| | |
| | | m_TaskSwithButton.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void bossGrabHintEvent()
|
| | | {
|
| | | IsShowTaskPanel();
|
| | | ShowFairyGrabBoss();
|
| | | AtkTypeChange();
|
| | | }
|
| | |
|
| | | private void ShowFairyGrabBoss()
|
| | | {
|
| | | m_ContainerGotoGrabBoss.gameObject.SetActive(fairyGrabBossModel.cacheGotoBossId != 0 &&
|
| | | !fairyGrabBossModel.grabBossHintOpen);
|
| | | }
|
| | |
|
| | | private void GotoFairyGrabBoss()
|
| | | {
|
| | | if (fairyGrabBossModel.cacheGotoBossId != 0)
|
| | | {
|
| | | var error = 0;
|
| | | if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
|
| | | {
|
| | | if (fairyGrabBossModel.IsBossKilled(fairyGrabBossModel.cacheGotoBossId))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FairyGrabBossOver");
|
| | | }
|
| | | MapTransferUtility.Instance.MoveToNPC(fairyGrabBossModel.cacheGotoBossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyGrabBossModel.DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void FlyToFairyGrabBoss()
|
| | | {
|
| | | if (fairyGrabBossModel.cacheGotoBossId != 0)
|
| | | {
|
| | | var error = 0;
|
| | | if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
|
| | | {
|
| | | var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
|
| | | var flyItemCount = ModelCenter.Instance.GetModel<PlayerPackModel>().GetItemCountByID(PackType.rptItem, GeneralDefine.flyBootItemId);
|
| | | var freeFly = ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0;
|
| | | if (bossInfoConfig != null)
|
| | | {
|
| | | if (freeFly || flyItemCount > 0)
|
| | | {
|
| | | MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (fairyGrabBossModel.flyToGrabBossRemind)
|
| | | {
|
| | | var money = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
|
| | | if (money >= 1)
|
| | | {
|
| | | FlyShoesUseCallback();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss;
|
| | | FlyShoseConfirmwin.confirmCallBack = FlyShoesUseCallback;
|
| | | WindowCenter.Instance.Open<FlyShoseConfirmwin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyGrabBossModel.DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void FlyShoesUseCallback()
|
| | | {
|
| | | switch (FlyShoseConfirmwin.useEnvironment)
|
| | | {
|
| | | case FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss:
|
| | | if (fairyGrabBossModel.cacheGotoBossId != 0)
|
| | | {
|
| | | var error = 0;
|
| | | if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
|
| | | {
|
| | | var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
|
| | | if (bossInfoConfig != null)
|
| | | {
|
| | | MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyGrabBossModel.DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshAdaptiveChat()
|
| | | {
|
| | | if (ChatTip.Inst == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | m_ContainerAdaptiveChat.sizeDelta = m_ContainerAdaptiveChat.sizeDelta.SetY(
|
| | | ChatTip.Inst.IsChatUp ? ChatTip.Inst.chatHighSize.y : ChatTip.Inst.chatLowSize.y);
|
| | | }
|
| | |
|
| | | private void IsCrossServerOneVsOne()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne() )//是否再跨服副本中
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())//是否再跨服副本中
|
| | | {
|
| | | WindowCenter.Instance.Open<FightingPKWin>();
|
| | | m_HeadPortraitTip.gameObject.SetActive(false);
|
| | |
| | | m_FunctionForecastTip.gameObject.SetActive(false);
|
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | | m_InGamePusher.gameObject.SetActive(false);
|
| | | m_RedBag.gameObject.SetActive(false);
|
| | | IsShowTaskPanel();
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
|
| | | {
|
| | | ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
|
| | | }
|
| | |
| | | {
|
| | | WindowCenter.Instance.Close<FightingPKWin>();
|
| | | }
|
| | | OnRedBagGet();
|
| | | }
|
| | | }
|
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |