static public int Clear(IntPtr l) { try { FastAction.FastMove self = (FastAction.FastMove)checkSelf(l); self.Clear(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private bool stopCurrent() { if (_currentFastMove != null && _currentFastMove.Previous == null) { // 前后都没有对象,列表最后一个执行完毕 if (_currentFastMove.Next == null) { if (_firstFastMove != null) { _firstFastMove.Clear(); } if (_endFastMove != null) { _endFastMove.Clear(); } if (_currentFastMove != null) { _currentFastMove.Clear(); } _firstFastMove = null; _endFastMove = null; _currentFastMove = null; _listCount = 0; //Debug.LogError("1"); return(true); } else // 第一个对象执行完,后置有对象 { if (_firstFastMove != null) { _firstFastMove = _currentFastMove.Next; _firstFastMove.Previous = null; _currentFastMove.Clear(); _currentFastMove = _firstFastMove; } //Debug.LogError("2"); } } else { // 执行到最后一个对象 if (_currentFastMove.Next == null) { _endFastMove = _currentFastMove.Previous; _endFastMove.Next = null; _currentFastMove.Clear(); _currentFastMove = _firstFastMove; //Debug.LogError("3"); _listCount -= 1; return(true); } else // 继续执行下一个对象 { _tempFastMove = _currentFastMove.Next; _tempFastMove.Previous = _currentFastMove.Previous; _tempFastMove.Previous.Next = _tempFastMove; _currentFastMove.Clear(); _currentFastMove = _tempFastMove; _tempFastMove = null; //Debug.LogError("4"); } } _listCount -= 1; return(false); }