private void Update() { if (Physics.Raycast(_camera.ScreenPointToRay(Input.mousePosition), out _hitInfo, ClickMask)) { _drawToPoint = _hitInfo.point; } else { return; } if (Input.GetMouseButtonDown(_MOUSE_BUTTON_LEFT)) { var resultPlayer = _player.AskAddPointPath(_drawToPoint); if (resultPlayer.TypeMessage == TypeMessagePlayer.AllIsOk) { _lastPoint = _drawToPoint; _lastPoint.y += _OFFSET_LINE_MOUSE; } SendMessageToUi(resultPlayer.Message); } _drawToPoint.y += _OFFSET_LINE_MOUSE; if (_player.IsMove()) { ShowLastPointToMouse(_drawToPoint); } else { _lastPoint = _player.Transform.position; ShowLastPointToMouse(_drawToPoint); } }