예제 #1
0
        // 从xml数据创建动作列表
        private List <CFSMAction> CreateActionListFromXML(CFSMXMLActionArray actionxmlList)
        {
            if (actionxmlList == null)
            {
                return(null);
            }
            List <CFSMAction> actionList = new List <CFSMAction>();
            Int32             nSize      = actionxmlList.m_ActionList == null ? 0 : actionxmlList.m_ActionList.Count;

            for (Int32 i = 0; i < nSize; ++i)
            {
                CFSMXMLAction actionxml = actionxmlList.m_ActionList[i];
                if (actionxml == null)
                {
                    continue;
                }
                CFSMAction newAction = new CFSMAction();
                if (newAction.CreateFromXML(actionxml) == false)
                {
                    BTDebug.Warning("<BTFSM> Create FSM Action Failed");
                    continue;
                }
                actionList.Add(newAction);
            }
            return(actionList);
        }
예제 #2
0
 public bool CreateFromXML(CFSMXMLAction xmlAction)
 {
     if (xmlAction == null)
     {
         return(false);
     }
     m_StrActionName = xmlAction.m_strName;
     //m_ParamArray = xmlAction.m_strParamList;
     m_PipelineCollection.AddConfigPipel(xmlAction.m_fsmEventList);
     m_PipelineCollection.AddConfigPipel(xmlAction.m_fsmConditionList);
     return(true);
 }