示例#1
0
 /// <summary>
 /// 根据动态引导行为节点ID实例化对象
 /// </summary>
 /// <param name="_nNodeID"></param>
 /// <returns></returns>
 protected internal TBTAction getNodeDataInstance(EGuideNodeID _nNodeID)
 {
     if (dicGuideNodeDataTypeTable != null && dicGuideNodeDataTypeTable.ContainsKey(_nNodeID))
     {
         return(dicGuideNodeDataTypeTable[_nNodeID].Assembly.CreateInstance(dicGuideNodeDataTypeTable[_nNodeID].ToString()) as TBTAction);
     }
     return(null);
 }
示例#2
0
 public void SetFromMsgData(UGuideWidgetMsgData _msgData)
 {
     this.GuideID            = (EGuideNodeID)_msgData.nGuideID;
     this.GuideEffectID      = _msgData.nGuideEffectID;
     this.GuideStepID        = _msgData.nGuideStepID;
     this.IsForceGuide       = _msgData.bForeceGuide;
     this.IsAcceptClickEvent = _msgData.bAcceptClickEvent;
 }
示例#3
0
 /// <summary>
 /// 根据动态引导行为节点ID取节点配置属性
 /// </summary>
 /// <param name="_nNodeID"></param>
 /// <returns></returns>
 protected internal SSchemeGuideNodeData getNodeConfigData(EGuideNodeID _nNodeID)
 {
     if (dicGuideConfigTable != null && dicGuideConfigTable.ContainsKey(_nNodeID))
     {
         return(dicGuideConfigTable[_nNodeID]);
     }
     return(null);
 }
示例#4
0
        public override bool IsTrue(TBTWorkingData wData)
        {
            bool result = false;

            EGuideNodeID currentLogicStepID = wData.As <GuideWorkingData>().GuideDynamicBB.GetValue <EGuideNodeID>(EGuideBBKey.LogicStepID, EGuideNodeID.GuideNodeID_None);

            result = currentLogicStepID == m_eGuideNodeID;

            TLogger.PROFILE("判断当引导ID(" + currentLogicStepID + ")是否与当前数据一致:" + result);

            return(result);
        }
示例#5
0
        public UGuideWidget GetGuideWidget(EGuideNodeID _eGuideID, int _nStepID)
        {
            if (m_listGuideWidget.Count <= 0 && _eGuideID == EGuideNodeID.GuideNodeID_None)
            {
                return(null);
            }

            for (int i = 0; i < m_listGuideWidget.Count; ++i)
            {
                if (m_listGuideWidget[i].GuideID == _eGuideID && m_listGuideWidget[i].GuideStepID == _nStepID)
                {
                    return(m_listGuideWidget[i]);
                }
            }

            return(null);
        }
示例#6
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);
        }
示例#7
0
        public void CreateNewDynamicGuideRoot(TBTWorkingData wData)
        {
            if (m_GuideDynamicRoot == null)
            {
                GuideWorkingData data = wData as GuideWorkingData;
                if (data != null && data.GuideDynamicBB != null)
                {
                    int GuideStateID = data.GuideStateBB.GetValue <int>(EGuideStateBBKey.GuideStateID, -1);
                    SSchemeGuideStateData stateData = GetGuideStateData(GuideStateID);
                    if (stateData != null)
                    {
                        m_GuideDynamicRoot = CreateDynamicRoot(stateData.GuideRootType);


                        for (int j = 0; j < stateData.GuideNodeIDList.Count; ++j)
                        {
                            EGuideNodeID         guideNodeID   = (EGuideNodeID)stateData.GuideNodeIDList[j];
                            SSchemeGuideNodeData guideNodeData = null;
                            if (dicGuideConfigTable.TryGetValue(guideNodeID, out guideNodeData))
                            {
                                //先根据引导节点需要挂接的父节点类型处理
                                EGuideActionLayerType layerType       = (EGuideActionLayerType)guideNodeData.nGuideActionLayerType;
                                TBTAction             layerTypeAction = null;
                                if (!m_GuideDynamicRoot.TryGetLayerTypeAction(layerType, out layerTypeAction))
                                {
                                    layerTypeAction = CreateLayerTypeAction(layerType);
                                    m_GuideDynamicRoot.AddChild(layerTypeAction);
                                }

                                layerTypeAction.AddChild(getNodeDataInstance(guideNodeID));
                            }
                            else
                            {
                                Trace.LogWarning("没有引导ID为:" + guideNodeID + " 的引导数据,配错了?");
                            }
                        }
                    }
                }
            }
        }
示例#8
0
 public NOD_SetCurrentGuideNode(EGuideNodeID _eGuideNodeID)
 {
     m_eGuideNodeID = _eGuideNodeID;
 }
示例#9
0
 public CON_IsNodeFinished(EGuideNodeID _nNodeID = EGuideNodeID.GuideNodeID_None)
 {
     m_nNodeID = _nNodeID;
 }
示例#10
0
 public CON_IsCurrentGuideNode(EGuideNodeID _eNodeID)
 {
     m_eGuideNodeID = _eNodeID;
 }
示例#11
0
 public CON_IsGuideUIWidgetClicked(int _nStepID, EGuideNodeID _eGuideNodeID = EGuideNodeID.GuideNodeID_None)
 {
     m_eGuideNodeID = _eGuideNodeID;
     m_nStepID      = _nStepID;
 }