Example #1
0
        /// <summary>
        /// Sets the branch target.
        /// </summary>
        /// <param name="target1">The first target.</param>
        /// <param name="target2">The second target.</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;
        }
Example #2
0
        /// <summary>
        /// Sets the branch target.
        /// </summary>
        /// <param name="target1">The first target.</param>
        public void SetBranch(int target1)
        {
            if (Branch == null)
                Branch = new Branch(1);

            Branch.Targets[0] = target1;
        }