Пример #1
0
        public bool AddConfigPipel(List <CFSMXMLConditionPipel> conXMLList)
        {
            Int32 nConditionPipelSize = conXMLList == null ? 0 : conXMLList.Count;

            for (Int32 i = 0; i < nConditionPipelSize; ++i)
            {
                CFSMXMLConditionPipel conditionPipelxml = conXMLList[i];
                if (conditionPipelxml == null)
                {
                    continue;
                }

                CFSMConditionTrigger trigger = new CFSMConditionTrigger();
                Int32 nSizeConCmp            = conditionPipelxml.m_conditionList == null ? 0 : conditionPipelxml.m_conditionList.Count;
                for (Int32 nCmpIndex = 0; nCmpIndex < nSizeConCmp; ++nCmpIndex)
                {
                    CFSMXMLCondition conditionxml = conditionPipelxml.m_conditionList[nCmpIndex];
                    if (conditionxml == null)
                    {
                        continue;
                    }
                    trigger.AddConditionCmp(conditionxml.m_strName, conditionxml.GetCmpType(), conditionxml.m_strValue);
                }
                CFSMConditionPipeline newPipeline = new CFSMConditionPipeline();
                newPipeline.SetTrigger(trigger);
                AddPipel(newPipeline);
            }
            return(true);
        }
Пример #2
0
 /// <summary>
 /// 设置条件触发数据
 /// </summary>
 /// <param name="trigger"></param>
 /// <returns></returns>
 public bool SetTrigger(CFSMConditionTrigger trigger)
 {
     if (trigger == null)
     {
         return(false);
     }
     m_ConditionTrigger = trigger;
     return(true);
 }