| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, February 19, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, February 19, 2019
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | {
|
| | |
|
| | | public class MainButtonMisc : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Button m_RedBag;//红包入口按钮
|
| | |
| | | CheckSendRedpackBtn();
|
| | | ShowFairyGrabBoss();
|
| | | IsCrossServerOneVsOne();
|
| | | |
| | |
|
| | | RedPacketModel.OnRedBagGetEvent += OnRedBagGet;
|
| | | OSEnvelopeModel.OSRedEnvelopeUpdateEvent += OnRedBagGet;
|
| | | OSEnvelopeModel.OSRedEnvelopeInfoEnvent += OnRedBagGet;
|
| | |
| | | PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;
|
| | | GA_NpcCollect.OnArrive += OnArriveCollectNPC;
|
| | | GA_NpcCollect.OnLeave += OnLeaveCollectNpc;
|
| | | GA_NpcClientCollect.OnArrive += OnArriveCollectNPC;
|
| | | GA_NpcClientCollect.OnLeave += OnLeaveCollectNpc;
|
| | | wishModel.UpdateWishAwardEvent += UpdateWishAwardImag;
|
| | | purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
|
| | | assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
|
| | |
| | | fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
|
| | | ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
|
| | | fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
|
| | | } |
| | | }
|
| | | public void OnActived()
|
| | | {
|
| | | RefreshAdaptiveChat();
|
| | | RefreshAdaptiveChat();
|
| | |
|
| | | } |
| | | }
|
| | | public void Unit()
|
| | | {
|
| | | m_CollectBehaviour.Dispose();
|
| | |
| | | {
|
| | | m_CollectBehaviour.Dispose();
|
| | | m_CollectBehaviour.gameObject.SetActive(false);
|
| | | } |
| | | }
|
| | | private void ClickWishAward()
|
| | | {
|
| | | WindowCenter.Instance.Open<WishingGetItemWin>();
|
| | | } |
| | | }
|
| | | private void UpdateWishAwardImag()
|
| | | {
|
| | | m_WishingAwardImg.gameObject.SetActive(wishModel.wishingAwardDict.Count > 0 ? true : false);
|
| | |
| | | private void ClickDungeonAssist()
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonAssistWin>();
|
| | | } |
| | | }
|
| | | private void UpdateDungeonAssistImag()
|
| | | {
|
| | | m_DungeonAssistImg.gameObject.SetActive(assistModel.IsNewAssistInfo);
|
| | |
| | | {
|
| | | if (fairyGrabBossModel.flyToGrabBossRemind)
|
| | | {
|
| | | var money = (int)UIHelper.GetMoneyCnt(1) ;
|
| | | var money = (int)UIHelper.GetMoneyCnt(1);
|
| | | if (money >= 1)
|
| | | {
|
| | | FlyShoesUseCallback();
|
| | |
| | | private void OnClickFriendQuest()
|
| | | {
|
| | | WindowCenter.Instance.Open<FriendQuestWin>();
|
| | | } |
| | | }
|
| | | private void OnFairyRequestClick()
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyInviteWin>();
|
| | | } |
| | | }
|
| | | private void UpdateFairyRequest()
|
| | | {
|
| | | m_FairyRequestBtn.gameObject.SetActive(fairyModel.FairyRequestRedPoint.count > 0);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|