Ejemplo n.º 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;
	}
Ejemplo n.º 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;
    }