Exemple #1
0
        public BehaviorTreeArgsDict Clone()
        {
            BehaviorTreeArgsDict behaviorTreeArgsDict = new BehaviorTreeArgsDict();

            foreach (KeyValuePair <string, object> keyValuePair in this.dict)
            {
                behaviorTreeArgsDict.Add(keyValuePair.Key, Clone(keyValuePair.Value));
            }
            return(behaviorTreeArgsDict);
        }
Exemple #2
0
        public BehaviorTreeArgsDict GetArgsDict()
        {
            BehaviorTreeArgsDict dict = new BehaviorTreeArgsDict();

            foreach (BTTypeBaseComponent item in gameObject.GetComponents <BTTypeBaseComponent>())
            {
                FieldInfo info = item.GetType().GetField("fieldValue");
                dict.Add(item.fieldName, info.GetValue(item));
            }
            return(dict);
        }