public abstract class BehaviorTreeNodeBase
{
protected static int ID;
protected int _id;
public BehaviorTreeNodeBase firstChildNode;
public BehaviorTreeNodeBase siblingNode;
public virtual BehaviorTreeState EvaluateNode(IBehaviorTreeAgent instance) { return BehaviorTreeState.None; }
public abstract void AddNode(BehaviorTreeNodeBase other);
public abstract void RemoveNode(BehaviorTreeNodeBase other);
public int id
{
get { return _id; }
}
}
public class BehaviorTreeNode : BehaviorTreeNodeBase
{
public BehaviorTreeNode() {
_id = ID;
ID++;
}
public BehaviorTreeNode(BehaviorTreeNode other)
{
this._id = other._id;
}
public override void AddNode(BehaviorTreeNodeBase other)
{
//Add child node
}
public override void RemoveNode(BehaviorTreeNodeBase other)
{
//Remove child node
}
}
public abstract class BehaviorTreeNodeBase
{
protected static int ID;
protected int _id;
public BehaviorTreeNodeBase firstChildNode;
public BehaviorTreeNodeBase siblingNode;
public virtual BehaviorTreeState EvaluateNode(IBehaviorTreeAgent instance) { return BehaviorTreeState.None; }
public abstract void AddNode(BehaviorTreeNodeBase other);
public abstract void RemoveNode(BehaviorTreeNodeBase other);
public int id
{
get { return _id; }
}
}
public class BehaviorTreeNode : BehaviorTreeNodeBase
{
public BehaviorTreeNode() {
_id = ID;
ID++;
}
public BehaviorTreeNode(BehaviorTreeNode other)
{
this._id = other._id;
}
public override void AddNode(BehaviorTreeNodeBase other)
{
//Add child node
}
public override void RemoveNode(BehaviorTreeNodeBase other)
{
//Remove child node
}
}