Beispiel #1
0
        public void Begin(FastMove fMove)
        {
            if (_firstFastMove == null)
            {
                _firstFastMove          = fMove;
                _firstFastMove.Previous = null;
                _firstFastMove.Next     = null;
                _currentFastMove        = _firstFastMove;
                _endFastMove            = _firstFastMove;
            }
            else
            {
                // 已经在链表中,不做处理
                if (_firstFastMove == fMove ||
                    _endFastMove == fMove ||
                    (fMove.Previous != null && fMove.Next != null))
                {
                    return;
                }

                _endFastMove.Next = fMove;
                fMove.Previous    = _endFastMove;
                _endFastMove      = fMove;
            }
            fMove.Prepare();
            _listCount += 1;
        }
Beispiel #2
0
 static public int Prepare(IntPtr l)
 {
     try {
         FastAction.FastMove self = (FastAction.FastMove)checkSelf(l);
         self.Prepare();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }