public override void OnDragAnchor()
            {
                Ray ray = _connectionCreator._camera.ScreenPointToRay(Input.mousePosition);

                RaycastHit hit;

                if (Physics.Raycast(ray, out hit))
                {
                    ConnectionAnchor overedAnchor = hit.collider.GetComponent <ConnectionAnchor>();
                    if (overedAnchor != null && _connectionCreator._overedAnchor != overedAnchor && overedAnchor != _connectionCreator._activeAnchor)
                    {
                        overedAnchor.SetActive();
                        _connectionCreator._overedAnchor?.SetPossible();
                        _connectionCreator._overedAnchor = overedAnchor;
                    }
                    else if (overedAnchor == null && _connectionCreator._overedAnchor != null)
                    {
                        _connectionCreator._overedAnchor.SetPossible();
                        _connectionCreator._overedAnchor = null;
                    }
                }

                float enter;

                if (_connectionCreator._plane.Raycast(ray, out enter))
                {
                    Vector3 hitPoint = ray.GetPoint(enter);
                    _connectionCreator._mouseTransform.position = hitPoint;
                }
            }
 public override void OnClickAnchor(ConnectionAnchor connectionAnchor)
 {
     /*_connectionCreator.ActivateAnchor(connectionAnchor);
      *
      * Destroy(_connectionCreator._tempConnection.gameObject);
      *
      * _connectionCreator._state = new AnchorClickedState(_connectionCreator);*/
 }
            public override void OnBeginDragAnchor(ConnectionAnchor connectionAnchor)
            {
                _connectionCreator.ActivateAnchor(connectionAnchor);

                _connectionCreator._mouseTransform.position = _connectionCreator._activeAnchor.transform.position;
                _connectionCreator._tempConnection          = _connectionCreator.CreateConnection(_connectionCreator._mouseTransform, _connectionCreator._activeAnchor.transform);

                _connectionCreator._state = new AnchorDragedState(_connectionCreator);
            }
 protected void ActivateAnchor(ConnectionAnchor connectionAnchor)
 {
     foreach (ConnectionAnchor anchor in _connectionAnchors)
     {
         anchor.SetPossible();
     }
     connectionAnchor.SetActive();
     _activeAnchor = connectionAnchor;
 }
            public override void OnClickAnchor(ConnectionAnchor connectionAnchor)
            {
                if (_connectionCreator._activeAnchor != connectionAnchor)
                {
                    _connectionCreator.CreateConnection(_connectionCreator._activeAnchor.transform, connectionAnchor.transform);
                }
                _connectionCreator.DisactivateAnchors();

                _connectionCreator._state = new DisactiveState(_connectionCreator);
            }
        public void OnBeginDrag(CustomInputInfo info)
        {
            ConnectionAnchor connectionAnchor = info.CollidedGameObject.GetComponent <ConnectionAnchor>();

            if (connectionAnchor != null)
            {
                _state.OnBeginDragAnchor(connectionAnchor);
            }
            else
            {
                _state.OnEmptyClick();
            }
        }
 public override void OnBeginDragAnchor(ConnectionAnchor connectionAnchor)
 {
 }
            public override void OnClickAnchor(ConnectionAnchor connectionAnchor)
            {
                _connectionCreator.ActivateAnchor(connectionAnchor);

                _connectionCreator._state = new AnchorClickedState(_connectionCreator);
            }
 abstract public void OnBeginDragAnchor(ConnectionAnchor connectionAnchor);
 abstract public void OnClickAnchor(ConnectionAnchor connectionAnchor);