public void SetGroup(List <ConditionGroup> conditionGroupList, List <BehaviorParameter> parameterList)
 {
     for (int i = 0; i < conditionGroupList.Count; ++i)
     {
         ConditionGroup          conditionGroup = conditionGroupList[i];
         ConditionGroupParameter group          = GetParameter(conditionGroup, parameterList);
         groupList.Add(group);
     }
 }
Example #2
0
        public void Init(List <ConditionGroup> conditionGroupList, List <BehaviorParameter> parameterList)
        {
            if (init)
            {
                return;
            }
            init = true;

            for (int i = 0; i < conditionGroupList.Count; ++i)
            {
                ConditionGroup          conditionGroup = conditionGroupList[i];
                ConditionGroupParameter group          = GetParameter(conditionGroup, parameterList);
                groupList.Add(group);
            }
        }
Example #3
0
        private ConditionGroupParameter GetParameter(ConditionGroup conditionGroup, List <BehaviorParameter> parameterList)
        {
            ConditionGroupParameter group = new ConditionGroupParameter();

            for (int i = 0; i < conditionGroup.parameterList.Count; ++i)
            {
                string parameter = conditionGroup.parameterList[i];
                for (int j = 0; j < parameterList.Count; ++j)
                {
                    if (parameter.CompareTo(parameterList[j].parameterName) == 0)
                    {
                        group.parameterList.Add(parameterList[j]);
                    }
                }
            }

            return(group);
        }