Esempio n. 1
0
        public static BehaviourTreeNodeProxy <T> CreateNode <T>() where T : Node
        {
            NodeProto p = new NodeProto();

            p.Name = typeof(T).Name;
            BehaviourTreeNodeProxy <T> proxy = new BehaviourTreeNodeProxy <T>(p);

            return(proxy);
        }
Esempio n. 2
0
        public static BehaviourTreeNodeProxy <T> AddNodeToLast <T>(BehaviorTreeConfig tree) where T : Node
        {
            BehaviorNodeConfig         parent = tree.RootNodeConfig;
            string                     name   = typeof(T).Name;
            BehaviorNodeConfig         p      = tree.AddChild(parent, name);
            BehaviourTreeNodeProxy <T> proxy  = new BehaviourTreeNodeProxy <T>(p.ToNodeProto());

            return(proxy);
        }