Ejemplo n.º 1
0
        /// <summary>
        /// Sets the branch.
        /// </summary>
        /// <param name="target1">The target1.</param>
        /// <param name="target2">The target2.</param>
        public void SetBranch(int target1, int target2)
        {
            if (Branch == null)
                Branch = new Branch(2);
            else
                if (Branch.Targets.Length < 2)
                {
                    Branch newBranch = new Branch(2);
                    newBranch.Targets[0] = Branch.Targets[0];
                    Branch = newBranch;
                }

            Branch.Targets[0] = target1;
            Branch.Targets[1] = target2;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the branch.
        /// </summary>
        /// <param name="target1">The target1.</param>
        public void SetBranch(int target1)
        {
            if (Branch == null)
                Branch = new Branch(1);

            Branch.Targets[0] = target1;
        }