コード例 #1
0
        public static I_TargetSelector Create(TextNode node)
        {
            string type_name = node.Name;
            Type   type;

            _target_select_map.TryGetValue(type_name, out type);
            if (type == null)
            {
                LogManager.Error("找不到对应的类型", type_name);
                return(null);
            }
            I_TargetSelector target_select = Activator.CreateInstance(type) as I_TargetSelector;

            if (target_select != null)
            {
                target_select.Init(node);
            }
            else
            {
                LogManager.Log("找不到对应的效果[{0}]", type);
            }

            return(target_select);
        }
コード例 #2
0
 public void AddFilter(I_TargetSelector selector)
 {
     _lists.Add(selector);
 }