// bool _UpdateDistance(float distance) { if (_nextNode == null) { return(false); } ViVector3 nextPos = _nextNode._pos; float distRight = Distance(_currentPos, nextPos); if (distRight > distance) { _currentPos += _dir * distance; } else { float newDistance = distance - distRight; _currentPos = nextPos; _prePos = nextPos; if (ViRouteNode.HasEvent(_nextNode._eventId)) { _endCallbackList.Invoke(_nextNode._eventId); } S_Nodes.Delete(_nodes.GetHead()); _nextNode = _LerpToNextNode(); if (_nextNode != null) { _UpdateDistance(newDistance); } else { _ClearState(); } } return(true); }
void _ClearNodeList() { S_Nodes.Delete(_nodes); }