示例#1
0
 public override void InitializeBranches(BranchList branches)
 {
     if (_ifJumpToId != 0)
     {
         if (_ifActions == null)
         {
             _ifActions = branches.GetJumpToActionBranch(_ifJumpToId);
             if (_ifActions == null)
             {
                 throw new DesignerException("Action for True branch not found (id={0})", _ifJumpToId);
             }
         }
     }
     else
     {
         _ifActions = null;
     }
     if (_elseJumpToId != 0)
     {
         if (_elseActions == null)
         {
             _elseActions = branches.GetJumpToActionBranch(_elseJumpToId);
             if (_elseActions == null)
             {
                 throw new DesignerException("Action for False branch not found (id={0})", _elseJumpToId);
             }
         }
     }
     else
     {
         _elseActions = null;
     }
 }
示例#2
0
 public override void InitializeBranches(BranchList branches)
 {
     if (_jumpToId != 0)
     {
         if (_jumpToActionBranch == null)
         {
             _jumpToActionBranch = branches.GetJumpToActionBranch(_jumpToId);
             if (_jumpToActionBranch == null)
             {
                 throw new DesignerException("JumpTo Action for action-list not found (id={0})", _jumpToId);
             }
         }
     }
     else
     {
         _jumpToActionBranch = null;
     }
 }
示例#3
0
        public override void LinkJumpedBranches(BranchList branches)
        {
            if (_jumpToId != 0)
            {
                if (_jumpToActionBranch == null || (_jumpToActionBranch.BranchId != _jumpToId && _jumpToActionBranch.FirstActionId != _jumpToId))
                {
                    _jumpToActionBranch = branches.GetJumpToActionBranch(_jumpToId);
                    if (_jumpToActionBranch == null)
                    {
                        throw new DesignerException("Invalid jump id [{0}] for branch [{1}]", _jumpToId, this.BranchId);
                    }

                    MathNode.Trace("Action string jump from [{0},{1}] to [{2},{3}]", this.BranchId, this.Name, _jumpToActionBranch.BranchId, _jumpToActionBranch.Name);
                }
                _jumpToActionBranch.SetPreviousAction(this);
                this.SetNextAction(_jumpToActionBranch);
            }
            base.LinkJumpedBranches(branches);
        }