Beispiel #1
0
	public void Update(NodeType nextType)
	{
		if (nextType == nodeType)
		{
			return;
		}

		switch(nextType)
		{
			case NodeType.Sequence:
				mInternalNode = new BirdNest.Nodes.Sequence();
				break;
			case NodeType.Selector:
				mInternalNode = new BirdNest.Nodes.Selector();
				break;
			case NodeType.Parallel:
				mInternalNode = new BirdNest.Nodes.Parallel();
				break;
			case NodeType.UsePlan:
				mInternalNode = new BirdNest.Nodes.UsePlanNode(this);
				break;
			default:
				mInternalNode = null;
				return;
		}
		nodeType = nextType;
	}
Beispiel #2
0
    public void Update(NodeType nextType)
    {
        if (nextType == nodeType)
        {
            return;
        }

        switch (nextType)
        {
        case NodeType.Sequence:
            mInternalNode = new BirdNest.Nodes.Sequence();
            break;

        case NodeType.Selector:
            mInternalNode = new BirdNest.Nodes.Selector();
            break;

        case NodeType.Parallel:
            mInternalNode = new BirdNest.Nodes.Parallel();
            break;

        case NodeType.UsePlan:
            mInternalNode = new BirdNest.Nodes.UsePlanNode(this);
            break;

        default:
            mInternalNode = null;
            return;
        }
        nodeType = nextType;
    }