Exemplo n.º 1
0
        protected override int onExecute(TBTWorkingData wData)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nHallBtnStepID);

            if (widget0 != null)
            {
                widget0.Hide();
            }

            UGuideWidget widget1 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nGameModeStepID);

            if (widget1 != null)
            {
                widget1.Hide();
            }

            UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_PLAYERBUTTONFRAME, WndMsgID.WND_MSG_PLAYERBUTTONFRAME_WARHALLBUTTON_REMOVEGUIDEWIDGET,
                                                   new UGuideWidgetMsgData((int)gData.GuideCurrentNode, m_nHallBtnStepID, m_nEffectID));
            UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_WAR_MAIN_FRAME, WndMsgID.WND_MSG_WAR_MAIN_GAMEMODEBTN_REMOVEGUIDEWIDGET,
                                                   new UGuideWidgetMsgData((int)gData.GuideCurrentNode, m_nGameModeStepID, m_nEffectID, _oUserData: m_nGameModeID));

            return(base.onExecute(wData));
        }
Exemplo n.º 2
0
            public int Execute(IFSMParam _data)
            {
                LifeHeroStateParam gData = _data as LifeHeroStateParam;

                UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.WorkingData.GuideCurrentNode, 0);

                if (widget0 != null && widget0.gameObject.activeInHierarchy && widget0.gameObject.activeSelf && !widget0.IsWidgetShow())
                {
                    widget0.Show();
                }
                else if (widget0 == null)
                {
                    UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_PLAYERBUTTONFRAME, WndMsgID.WND_MSG_PLAYERBUTTONFRAME_WARHALLBUTTON_ADDGUIDEWIDGET,
                                                           new UGuideWidgetMsgData((int)gData.WorkingData.GuideCurrentNode, 0, gData.ActionLeaf.EffectID, _bClickEvent: false));
                }

                UGuideWidget widget1 = GuideManager.Instance.GetGuideWidget(gData.WorkingData.GuideCurrentNode, 1);

                if (widget1 != null && widget1.gameObject.activeInHierarchy && widget1.gameObject.activeSelf && !widget1.IsWidgetShow())
                {
                    widget1.Show();
                }
                else if (widget1 == null)
                {
                    UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_WAR_MAIN_FRAME, WndMsgID.WND_MSG_WAR_MAIN_GAMEMODEBTN_ADDGUIDEWIDGET,
                                                           new UGuideWidgetMsgData((int)gData.WorkingData.GuideCurrentNode, 1, gData.ActionLeaf.EffectID, _oUserData: 1, _bClickEvent: false));
                }
                return(0);
            }
Exemplo n.º 3
0
        protected override void onExit(TBTWorkingData wData, int runningStatus)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, 0);

            if (widget0 != null)
            {
                widget0.Hide();
            }

            UGuideWidget widget1 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, 1);

            if (widget1 != null)
            {
                widget1.Hide();
            }

            UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_PLAYERBUTTONFRAME, WndMsgID.WND_MSG_PLAYERBUTTONFRAME_WARHALLBUTTON_REMOVEGUIDEWIDGET,
                                                   new UGuideWidgetMsgData((int)gData.GuideCurrentNode, 0, m_nEffectID));
            UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_WAR_MAIN_FRAME, WndMsgID.WND_MSG_WAR_MAIN_GAMEMODEBTN_REMOVEGUIDEWIDGET,
                                                   new UGuideWidgetMsgData((int)gData.GuideCurrentNode, 1, m_nEffectID, _oUserData: m_nGameModeID));

            base.onExit(wData, runningStatus);
        }
Exemplo n.º 4
0
            public int Exit(IFSMParam _data)
            {
                LifeHeroStateParam gData = _data as LifeHeroStateParam;

                UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.WorkingData.GuideCurrentNode, 10);

                if (widget0 != null)
                {
                    widget0.Hide();
                }

                return(0);
            }
Exemplo n.º 5
0
        protected override bool CustomPrecondition(TBTWorkingData wData)
        {
            bool result = false;

            GuideWorkingData gData = wData as GuideWorkingData;

            EGuideNodeID tmpGuideNodeID = m_eGuideNodeID == EGuideNodeID.GuideNodeID_None ? gData.GuideCurrentNode : m_eGuideNodeID;

            UGuideWidget widget = GuideManager.Instance.GetGuideWidget(tmpGuideNodeID, m_nStepID);

            if (widget != null)
            {
                result = widget.IsWidgetClick();
            }

            return(result);
        }
Exemplo n.º 6
0
        protected override void onEnter(TBTWorkingData wData)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            UGuideWidget widget = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nStepID);

            if (widget != null)
            {
                if (m_strToStringDebugMessage == null)
                {
                    m_strToStringDebugMessage = string.Format(m_strDefaultDebugMessage, gData.GuideCurrentNode, widget.ToString());
                }

                widget.Hide();
            }

            base.onEnter(wData);
        }
Exemplo n.º 7
0
        public void ForceDestroyUGuideWidget()
        {
            if (m_listGuideWidget.Count <= 0)
            {
                return;
            }

            UGuideWidget widget        = null;
            GameObject   guideWidgetGO = null;

            while (m_listGuideWidget.Count > 0)
            {
                widget        = m_listGuideWidget[0];
                guideWidgetGO = widget.gameObject;
                ResNode.DestroyRes(ref guideWidgetGO);
                m_listGuideWidget.RemoveAt(0);
            }
        }
Exemplo n.º 8
0
        protected override int onExecute(TBTWorkingData wData)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nHallBtnStepID);

            if (widget0 != null && widget0.gameObject.activeInHierarchy && widget0.gameObject.activeSelf && !widget0.IsWidgetShow())
            {
                widget0.Show();
            }
            else if (widget0 == null)
            {
                UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_PLAYERBUTTONFRAME, WndMsgID.WND_MSG_PLAYERBUTTONFRAME_WARHALLBUTTON_ADDGUIDEWIDGET,
                                                       new UGuideWidgetMsgData((int)gData.GuideCurrentNode, m_nHallBtnStepID, m_nEffectID, _bClickEvent: false));
            }

            UGuideWidget widget1 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nGameModeStepID);

            if (widget1 != null && widget1.gameObject.activeInHierarchy && widget1.gameObject.activeSelf && !widget1.IsWidgetShow())
            {
                widget1.Show();
            }
            else if (widget1 == null)
            {
                UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_WAR_MAIN_FRAME, WndMsgID.WND_MSG_WAR_MAIN_GAMEMODEBTN_ADDGUIDEWIDGET,
                                                       new UGuideWidgetMsgData((int)gData.GuideCurrentNode, m_nGameModeStepID, m_nEffectID, _oUserData: m_nGameModeID, _bClickEvent: false));
            }

            int result = TBTRunningStatus.EXECUTING;

            //UGuideWidget widget = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, 1);

            //if (widget != null && widget.IsWidgetClick())
            //{
            //    result = base.onExecute(wData);
            //}

            if (LogicDataCenter.playerSystemDataManager != null && LogicDataCenter.lifeHeroDataManager.LifeHeroMatchType == ELifeHeroMatchType.HAVE_MatchType_Rank)
            {
                result = base.onExecute(wData);
            }

            return(result);
        }
Exemplo n.º 9
0
            public int Execute(IFSMParam _data)
            {
                LifeHeroStateParam gData = _data as LifeHeroStateParam;

                UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.WorkingData.GuideCurrentNode, 10);

                if (widget0 != null && widget0.gameObject.activeInHierarchy && widget0.gameObject.activeSelf && !widget0.IsWidgetShow())
                {
                    widget0.Show();
                }
                else if (widget0 == null)
                {
                    UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_LIFE_HERO_ENTRANCE, WndMsgID.WND_MSG_LIFEHERO_GUIDE_ACTIONBEGIN,
                                                           new UGuideWidgetMsgData((int)gData.WorkingData.GuideCurrentNode, 10, gData.ActionLeaf.EffectID2, _bClickEvent: false));
                }


                return(0);
            }
Exemplo n.º 10
0
        protected override int onExecute(TBTWorkingData wData)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            int result = base.onExecute(wData);

            result = ShowWidget(gData);

            if (TBTRunningStatus.IsFinished(result))
            {
                result = m_bClickWidgetFinished ? TBTRunningStatus.USER_EXECUTING : result;
                UGuideWidget widget = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, m_nStepID);
                if (widget != null && widget.IsWidgetClick())
                {
                    result = TBTRunningStatus.FINISHED;
                }
            }

            return(result);
        }
Exemplo n.º 11
0
        protected int ShowWidget(GuideWorkingData _data)
        {
            if (m_bDoOnce)
            {
                return(TBTRunningStatus.USER_FINISHED);
            }

            UGuideWidget widget = GuideManager.Instance.GetGuideWidget(_data.GuideCurrentNode, m_nStepID);

            if (widget != null)
            {
                if (m_strToStringDebugMessage == null)
                {
                    m_strToStringDebugMessage = string.Format(m_strDefaultDebugMessage, _data.GuideCurrentNode, widget.ToString());
                }

                widget.Show();
                m_bDoOnce = true;
                return(TBTRunningStatus.USER_FINISHED);
            }

            return(TBTRunningStatus.USER_EXECUTING);
        }
Exemplo n.º 12
0
        protected override int onExecute(TBTWorkingData wData)
        {
            GuideWorkingData gData = wData as GuideWorkingData;

            UGuideWidget widget0 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, 0);

            if (widget0 != null && widget0.gameObject.activeInHierarchy && widget0.gameObject.activeSelf && !widget0.IsWidgetShow())
            {
                widget0.Show();
            }
            else if (widget0 == null)
            {
                UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_PLAYERBUTTONFRAME, WndMsgID.WND_MSG_PLAYERBUTTONFRAME_WARHALLBUTTON_ADDGUIDEWIDGET,
                                                       new UGuideWidgetMsgData((int)gData.GuideCurrentNode, 0, m_nEffectID, _bClickEvent: false));
            }

            UGuideWidget widget1 = GuideManager.Instance.GetGuideWidget(gData.GuideCurrentNode, 1);

            if (widget1 != null && widget1.gameObject.activeInHierarchy && widget1.gameObject.activeSelf && !widget1.IsWidgetShow())
            {
                widget1.Show();
            }
            else if (widget1 == null)
            {
                UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_WAR_MAIN_FRAME, WndMsgID.WND_MSG_WAR_MAIN_GAMEMODEBTN_ADDGUIDEWIDGET,
                                                       new UGuideWidgetMsgData((int)gData.GuideCurrentNode, 1, m_nEffectID, _oUserData: m_nGameModeID, _bClickEvent: false));
            }

            int result = TBTRunningStatus.EXECUTING;

            if (LogicDataCenter.lifeHeroDataManager.HistoryRecord.Count >= m_nMatchLimit)
            {
                result = base.onExecute(wData);
            }

            return(result);
        }
Exemplo n.º 13
0
 public void UnRegisterUGuideWidget(UGuideWidget _widget)
 {
     m_listGuideWidget.Remove(_widget);
 }
Exemplo n.º 14
0
 public void RegisterUGuideWidget(UGuideWidget _widget)
 {
     m_listGuideWidget.Add(_widget);
 }
Exemplo n.º 15
0
        public virtual void SetData(UListHeroTalentData item)
        {
            TalentIconImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Skill, WndID.WND_ID_GAMEWAITINGROOMVIEW, 1, item.nTalentIconId);
            TalentIconImage.ResetToDefaultMaterial();
            TalentNameText.ResetToDefaultMaterial();
            TalentDescText.ResetToDefaultMaterial();
            TalentKeyText.ResetToDefaultMaterial();
            if (TalentIconImage.sprite == null) // 空的话给个默认的
            {
                TalentIconImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_GAMEWAITINGROOMVIEW, 1, 3, 4);
            }

            string sTalentDesc = item.sTalentDesc;
            string sTalentName = item.sTalentName;

            UBBProperty.GetInstance().getRatio(sTalentDesc);
            U3D_Render.Common.UBB.toHtml(ref sTalentDesc, UBB_FORMAT_TYPE.UGUI);
            // 此处需要再转换一下,不然PASD标签不能正确解析
            U3D_Render.Common.UBB.toHtml(ref sTalentDesc, UBB_FORMAT_TYPE.UGUI);

            U3D_Render.Common.UBB.toHtml(ref sTalentName, UBB_FORMAT_TYPE.UGUI);

            TalentDescText.text = sTalentDesc;
            UseTypeText.text    = item.sUseTypeDesc;
            TalentNameText.text = sTalentName;
            TalentKeyText.text  = "Ctrl+" + item.nSortIndex;
            Item = item;

            bActive = LogicDataCenter.heroTalentDataManager.isActivedThisTalent(item.nTalentId);
            ActiveObject.SetActive(bActive);

            if (NoActiveLockObject != null)
            {
                NoActiveLockObject.SetActive(item.bLock);
            }

            // 前置天赋未激活
            bTermActive = LogicDataCenter.heroTalentDataManager.isActivedThisTalent(item.nTalentTermId);
            ActiveObject.SetActive(bActive);

            if (item.nTalentTermId > 0 && !bTermActive)
            {
                TalentDescText.text = sTalentDesc + "(前置天赋未激活)";
                TalentIconImage.AddNewMaterial(EUIShaderType.EST_Gray);
                TalentNameText.AddNewMaterial(EUIShaderType.EST_Gray);
                TalentDescText.AddNewMaterial(EUIShaderType.EST_Gray);
                TalentKeyText.AddNewMaterial(EUIShaderType.EST_Gray);
            }

            bCanActive = LogicDataCenter.heroTalentDataManager.isCanActiveTalent(item.nTalentId, item.nTalentLevel);

            // 推荐图标
            if (RecommandImage != null)
            {
                if (Item.bRecommand)
                {
                    RecommandImage.gameObject.SetActive(true);
                }
                else
                {
                    RecommandImage.gameObject.SetActive(false);
                }
            }

            #region 新手引导部分
            if (item.bUseGuideWidget)
            //{
            //    gameObject.RemoveComponent<UGuideWidget>();
            //}
            //else
            {
                UGuideWidget guideWidget = gameObject.GetComponent <UGuideWidget>();
                if (guideWidget == null)
                {
                    guideWidget = this.gameObject.AddComponent <UGuideWidget>();
                }
                guideWidget.GuideID       = (GUIDE.EGuideNodeID)item.nGuideID;
                guideWidget.GuideStepID   = item.nGuideStepID;
                guideWidget.GuideEffectID = item.nGuideEffectID;
                guideWidget.IsForceGuide  = true;
            }
            #endregion
        }