Пример #1
0
        private void LateUpdate()
        {
            if (!_isStarted)
            {
                return;
            }

            UpdateCurrentLine(ControlAssistant.GetMousePosition());
        }
Пример #2
0
        private void UpdateDraw(Vector3 mousePos)
        {
            if (!_isStarted)
            {
                return;
            }

            var verticesSize = _vertices.Count;

            if (!ControlAssistant.IsMouseMove() && Vector3.Distance(_vertices[verticesSize - 1], mousePos) > 2f)
            {
                AddPoint(mousePos);
                AddLine(_vertices[verticesSize - 1]);
                UpdateCurrentLine(mousePos);
            }
        }