Пример #1
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_fMouseLineOriginLen = mouseLineImage.rectTransform.sizeDelta.x * UISystem.Instance.GetCanvas().scaleFactor;
            return(true);
        }
Пример #2
0
        //设置屏蔽技能音效,根据当前是否有需要屏蔽的界面打开判断
        public void Forbid3DSound(IUIWnd wnd, bool bForbid)
        {
            int index = m_forbid3dSoundWndList.IndexOf(wnd);

            if (bForbid)
            {
                if (index < 0)
                {
                    m_forbid3dSoundWndList.Add(wnd);
                }
            }
            else
            {
                if (index > -1)
                {
                    m_forbid3dSoundWndList.RemoveAt(index);
                }

                //如果表里面还有,那就renturn,不能解除屏蔽
                if (m_forbid3dSoundWndList.Count > 0)
                {
                    return;
                }
            }
            SoundManager.Forbid3DSound(bForbid);
        }
Пример #3
0
        public override bool Init(IUIWnd wnd)
        {
            if (DefaultComponent_Type0 != null)
            {
                DefaultComponent_Type0.gameObject.SetActive(false);
            }
            if (DefaultComponent_Type1 != null)
            {
                DefaultComponent_Type1.gameObject.SetActive(false);
            }
            DefaultComponent = DefaultComponent_Type0;

            if (AutoRemoveComponent != null)
            {
                AutoRemoveComponent.gameObject.SetActive(false);
            }
            if (AlwaysDisplayComponent != null)
            {
                AlwaysDisplayComponent.gameObject.SetActive(false);
            }

            if (RewardComponent != null)
            {
                RewardComponent.gameObject.SetActive(false);
            }

            m_listUsingComponent       = new List <UGuideNodeDisplayComponent>();
            m_listUsingRewardComponent = new List <UGuideNodeRewardComponent>();
            m_dicGuideEffect           = new List <UEffectParamBase>();


            m_defaultCustomUserData = new UGuideMsgData.CustomUserData(0f, 250f, 0);
            //ModalColor = new Color(0, 0, 0, 233f / 255f);
            return(base.Init(wnd));
        }
Пример #4
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_FlopWnd = wnd as GenstoneChestFlopWnd;
            return(true);
        }
Пример #5
0
        /// <summary>
        /// 激活通用模糊背景效果
        /// </summary>
        /// <param name="wnd"></param>
        /// <param name="bActive"></param>
        public void ActiveCommonBlurEffect(IUIWnd wnd, bool bActive)
        {
            int index = m_CommonBlurEffectWndList.IndexOf(wnd);

            if (bActive)
            {
                if (index < 0)
                {
                    m_CommonBlurEffectWndList.Add(wnd);
                }
                UISystem.Instance.ShowWnd(WndID.WMD_ID_COMMONBLURBG, true);
            }
            else
            {
                if (index > -1)
                {
                    m_CommonBlurEffectWndList.RemoveAt(index);
                }

                if (m_CommonBlurEffectWndList.Count > 0)
                {
                    int result = m_CommonBlurEffectWndList.FindIndex(x => x != null);
                    if (result > -1)
                    {
                        return;
                    }
                }
                UISystem.Instance.ShowWnd(WndID.WMD_ID_COMMONBLURBG, false);
            }
        }
Пример #6
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            BuddyGroupTree.DefaultColor     = Color.white;
            BuddyGroupTree.SelectedColor    = Color.white;
            BuddyGroupTree.HighlightedColor = Color.white;
            BuddyGroupTree.Start();

            SettingWnd.Init();

            SearchBuddy.onValueChanged.AddListener(onSearchBuddy);
            SearchBuddy.onSelectEvent   = delegate(){ SearchBuddyView.gameObject.SetActive(true); };
            SearchBuddy.onDeselectEvent = delegate(){
                if (SearchBuddyView.IsPointerExit)
                {
                    SearchBuddyView.gameObject.SetActive(false);
                }
            };

            MyMoodInputField.onEndEdit.AddListener(onMoodChange);
            MoodBg           = MyMoodInputField.GetComponent <Image>();
            MoodTips         = MyMoodInputField.GetComponent <UTooltipTrigger>();
            MoodTips.enabled = false;

            return(true);
        }
Пример #7
0
        public override bool Init(IUIWnd wnd)
        {
            issueTitleText.text = ULocalizationService.Instance.Get("UIView", "PrenticeIssue", "IssueTitleDesc");
            PrenticeIssueFrame.Init();

            return(base.Init(wnd));
        }
Пример #8
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_PlayerVsWnd = wnd as StaticBottomCenterWnd;
            return(true);
        }
Пример #9
0
        public override bool Init(IUIWnd wnd)
        {
            TimerManager.SetTimer(this, (int)EN_WarCombo_Timer.ENWT_AttackTimer, 5.0f);
            TimerManager.SetTimer(this, (int)EN_WarCombo_Timer.ENWT_KillTimer, 5.0f);

            return(base.Init(wnd));
        }
Пример #10
0
        public override bool Init(IUIWnd wnd)
        {
            bool ret = base.Init(wnd);

            m_navItemList         = new List <UButtonGroupItem>();
            m_navIDList           = new List <int>();
            m_builtInNavMethodMap = new Dictionary <int, int>();

            Title.text = ULocalizationService.Instance.Get("UIView", "GamePromotion", "PromotionTitle");

            if (NavGroup == null || DefaultNavItem == null)
            {
                Debug.LogError("GamePromotionView: NavGroup == null || DefaultNavItem == null!");
                return(false);
            }

            if (!InitSubFrameView())
            {
                return(false);
            }

            m_curNavID = 0;
            InitDefaultNavList();
            //ShowSubFrameView(GamePromotionButtonType.BTN_TAITANSAYSAY);
            EntityEventHelper.Instance.SendCommand(EntityFactory.MainHeroID, EntityLogicDef.ENTITY_CMD_REQUEST_NAVGROUP);

            LogicDataCenter.gamePromotionDataManager.RequestWebUrl((int)GameWebUrl.TAITAN_ACTIVITIES_LINK);
            LogicDataCenter.gamePromotionDataManager.RequestWebUrl((int)GameWebUrl.QRCODE_LINK);
            LogicDataCenter.gamePromotionDataManager.RequestWebUrl((int)GameWebUrl.WEB_INTERFACE_LINK);
            LogicDataCenter.gamePromotionDataManager.RequestWebUrl((int)GameWebUrl.WITHDRAW_LINK);
            LogicDataCenter.gamePromotionDataManager.RequestWebUrl((int)GameWebUrl.SHARE_PERSONAL_LINK);

            return(ret);
        }
Пример #11
0
        //private bool m_EnterBtnFlag;

        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            GroupDes.text              = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "Group");
            DataDes.text               = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "Data");
            TimeDes.text               = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "Time");
            AgainstDes.text            = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "Against");
            KinNumDes.text             = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "KinNum");
            ViewCompetitionBtnDes.text = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "ViewCompetitionBtn");

            CupBigKnockTip.text = "<a href=CupBigKnockTip color=bbbbbc>" + ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "CupGroupTip") + "</a>";
            CupBigKnockTip.onHrefClick.AddListener(OnClickCupBigKnockoutRT);

            CompetitionBonus.text = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "CompetitionBonus") + ":-";
            CompetitionAward.text = "<a href=CompetitionAward color=38db47>" + ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "CompetitionAward") + "</a>";
            CompetitionAward.onHrefClick.AddListener(OnClickCompetitionAwardRT);

            string strGroupA = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_A");
            string strGroupB = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_B");
            string strGroupC = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_C");
            string strGroupD = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_D");
            string strGroupE = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_E");
            string strGroupF = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_F");
            string strGroupG = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_G");
            string strGroupH = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "GroupIndex_H");

            m_GroupIndex = new List <string> {
                strGroupA, strGroupB, strGroupC, strGroupD, strGroupE, strGroupF, strGroupG, strGroupH
            };

            return(true);
        }
Пример #12
0
        protected bool CheckShowCursorByWNDLayer(WndLayerDef _eLayer)
        {
            RectTransform layerTrans = m_layerTransform[(int)_eLayer];

            if (layerTrans == null)
            {
                return(false);
            }

            for (int i = layerTrans.childCount - 1; i >= 0; --i)
            {
                Transform wndViewTrans = layerTrans.GetChild(i);
                if (wndViewTrans.gameObject.activeSelf)
                {
                    IUIWndView view = wndViewTrans.GetComponent <IUIWndView>();
                    if (view != null)
                    {
                        IUIWnd wnd = view.GetUIWnd();
                        if (wnd.IsCanCloseKey() || _eLayer == WndLayerDef.WND_LAYER_FILL)
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
Пример #13
0
        bool isMatchWnd(IUIWnd wnd)
        {
            int       loadMask;
            EGameMode gameMode = GameLogicAPI.getCurGameMode();

            switch (gameMode)
            {
            case EGameMode.EGM_Moba:
                loadMask = (int)WndLoadMaskDef.WND_LoadMask_Moba;
                break;

            case EGameMode.EGM_MCAMP:
                loadMask = (int)WndLoadMaskDef.WND_LoadMask_MCAMP;
                break;

            case EGameMode.EGM_RPG:
            default:
                loadMask = (int)WndLoadMaskDef.WND_LoadMask_RPG;
                break;
            }

            int permissionMask = (int)WndPermissionMaskDef.WND_PM_Normal;

            if (StageManager.Instance.CurPermissionState == EStage_PermissionState.ESPS_OB)
            {
                permissionMask = (int)WndPermissionMaskDef.WND_PM_OB;
            }

            return((wnd.GetLoadMask() & loadMask) != 0 && (wnd.GetPermissionMask() & permissionMask) != 0);
        }
Пример #14
0
 public override bool Init(IUIWnd wnd)
 {
     m_Container      = this.GetComponent <RectTransform>();
     m_Anim           = this.GetComponent <WarFloatFontAnim>();
     floatFontItemRes = AssetBundleManager.GetAssets(AssetType.Asset_Prefab, "UI/Prefabs/DynamicState_Moba/FloatFont/FloatFontItem");
     return(base.Init(wnd));
 }
Пример #15
0
        // 发送消息
        public void SendWndMessage(WndMsgID msgID, UIMsgData data = null)
        {
            if (m_messageList == null)
            {
                return;
            }

            Initialize.PrintTickCheck("SendWndMessage", _bStart: true);

            List <IUIWnd> list;

            if (m_messageList.TryGetValue(msgID, out list))
            {
                // 先复制一份以防目标在OnMessage中改变订阅list
                IUIWnd[] tempList = new IUIWnd[list.Count];

                list.CopyTo(tempList);

                Initialize.PrintTickCheck("SendWndMessage list.CopyTo");

                for (int i = 0; i < tempList.Length; ++i)
                {
                    tempList[i].OnMessage(msgID, data);
                    Initialize.PrintTickCheck("OnMessage::" + msgID + ", wnd::" + tempList[i].GetID());
                }
            }
        }
Пример #16
0
        // 按键消息
        public bool OnKeyMessage(FuntionShortCutSlotIndex index, KeyStatus status)
        {
            if (m_keyMessageList == null)
            {
                return(false);
            }

            if (index == FuntionShortCutSlotIndex.Exit && status == KeyStatus.Down)
            {
                OnPressCloseKey();
                return(true);
            }

            List <IUIWnd> list;

            if (m_keyMessageList[(int)status].TryGetValue(index, out list))
            {
                // 先复制一份以防目标在OnKeyMessage中改变订阅list
                IUIWnd[] tempList = new IUIWnd[list.Count];
                list.CopyTo(tempList);
                for (int i = 0; i < tempList.Length; ++i)
                {
                    if (tempList[i].OnKeyMessage(index, status))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Пример #17
0
        // 订阅消息
        public bool RegisterWndMessage(WndMsgID msgID, IUIWnd wnd)
        {
            if (m_messageList == null || wnd == null)
            {
                return(false);
            }

            List <IUIWnd> list;

            if (m_messageList.TryGetValue(msgID, out list))
            {
                for (int i = 0; i < list.Count; ++i)
                {
                    if (list[i] == wnd)
                    {
                        return(false);
                    }
                }

                list.Add(wnd);
            }
            else
            {
                list = new List <IUIWnd>();
                list.Add(wnd);

                m_messageList[msgID] = list;
            }
            return(true);
        }
Пример #18
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);
            buttonPrefabRes = AssetBundleManager.GetAssets(AssetType.Asset_Prefab, UPath.UPrefabsPath + "SideButtonList/SideButtonListItem");

            buttonList = new SideButtonListItem[m_nMaxListItemNum];
            float yOffset = -293f;

            for (int i = 0; i < m_nMaxListItemNum; ++i)
            {
                if (buttonPrefabRes != null)
                {
                    SideButtonListItem item = buttonPrefabRes.InstanceMainRes <SideButtonListItem>();
                    buttonList[i] = item;
                    RectTransform btnTrans = item.transform as RectTransform;
                    Vector3       btnPos   = btnTrans.localPosition;
                    btnPos.y = yOffset;
                    btnTrans.localPosition = btnPos;
                    yOffset += 55f;
                    btnTrans.SetParent(buttonContainer, false);

                    item.gameObject.SetActive(false);
                }
            }
            upBtn.gameObject.SetActive(false);
            downBtn.gameObject.SetActive(false);

            m_nCurIndexOffset = 0;

            return(true);
        }
Пример #19
0
        public override bool Init(IUIWnd wnd)
        {
            TitleText.text = ULocalizationService.Instance.Get("UIView", "WarReliveTime", "Title");
            UnitText.text  = ULocalizationService.Instance.Get("UIView", "WarReliveTime", "Unit");

            return(base.Init(wnd));
        }
Пример #20
0
        public override bool Init(IUIWnd wnd)
        {
            m_PrizeTipData = null;

            goBtnText.text = ULocalizationService.Instance.Get("UIView", "PrizeTip", "GoBtnTextDesc");

            return(base.Init(wnd));
        }
Пример #21
0
        public override bool Init(IUIWnd wnd)
        {
            TimerManager.SetTimer(this, (int)EN_HeroBearing_Timer.EHBT_Pointer, 0.5f);

            m_showAround = GameLogicAPI.getCurGameMode() == Game_ManagedDef.EGameMode.EGM_MCAMP ? SPELL.CampFlag.CampFlag_Friend : SPELL.CampFlag.CampFlag_Enemy;

            return(base.Init(wnd));
        }
Пример #22
0
        public override bool Init(IUIWnd wnd)
        {
            bool result = base.Init(wnd);

            Dialog.onDialogHideEvent += OnDialogHideEvent;

            return(result);
        }
Пример #23
0
        public override bool Init(IUIWnd wnd)
        {
            titleText.text = ULocalizationService.Instance.Get("UIView", "Mail", "FastRecvPlusBoxTitle");

            SetData();

            return(base.Init(wnd));
        }
Пример #24
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_ItemList = new Dictionary <uint, ChatBubbleItem>();

            return(true);
        }
Пример #25
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_InputDialogList = new Dictionary <int, SNSInputDialogSubWndView>();

            return(true);
        }
Пример #26
0
        public override bool Init(IUIWnd wnd)
        {
            Title.text           = ULocalizationService.Instance.Get("UIView", "LoginQueueInfo", "Title");
            RemainTimeTitle.text = ULocalizationService.Instance.Get("UIView", "LoginQueueInfo", "RemainTimeTitle");
            OrderTitle.text      = ULocalizationService.Instance.Get("UIView", "LoginQueueInfo", "OrderTitle");

            return(base.Init(wnd));
        }
Пример #27
0
 public override bool Init(IUIWnd wnd)
 {
     attackText.text = "0";
     assistText.text = "0";
     dieText.text    = "0";
     netLatency.text = "0ms";
     return(base.Init(wnd));
 }
Пример #28
0
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            m_SupportWnd = wnd as WarSupportPlayerWnd;
            SupportVoteFrame.SetParentView(this);

            return(true);
        }
Пример #29
0
        // 初始化
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            SearchFrame.SetWndView(this);
            ReturnBtnDesc.text = ULocalizationService.Instance.Get("UIView", "Common", "Return");

            return(true);
        }
Пример #30
0
        public override bool Init(IUIWnd wnd)
        {
            //Title.text = ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "Title");
            PlayerCountTitle.text = ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "PlayerCountTitle");
            UsedTimeTitle.text    = ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "UsedTimeTitle");
            RotateIcon.gameObject.SetActive(false);

            return(base.Init(wnd));
        }