Beispiel #1
0
        private void PlaceNode()
        {
            if (!IsPlacingNode)
            {
                return;
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                PlaceOne();
            }
        }
        private void DeleteLink()
        {
            if (!IsSelecting)
            {
                return;
            }

            Link link = FindNearestLik();

            SelectEffect(link);
            if (link == null)
            {
                return;
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                DeleteOne(link);
            }
        }
        private void DeleteArrow()
        {
            if (!IsSelecting)
            {
                return;
            }

            Arrow arrow = FindNearestArrow();

            SelectedEffect(arrow);
            if (arrow == null)
            {
                return;
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                DeleteOne(arrow);
            }
        }
        private void SetPath()
        {
            if (!IsPlacing)
            {
                return;
            }

            Node node = FindNearestNode();

            SelectEffect(node);
            if (node == null)
            {
                return;
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                SetNode(node);
            }
        }
Beispiel #5
0
        private void DeleteNode()
        {
            if (!IsSelecting)
            {
                return;
            }

            Node node = FindNearestNode();

            SelectedEffect(node);
            if (node == null)
            {
                return;
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                DeleteOne(node);
            }
        }
Beispiel #6
0
        private void SetArrow()
        {
            if (!IsPlacing)
            {
                return;
            }

            if (PlacedOne != null)
            {
                ChangeDirection();
            }

            if (Input.GetMouseButtonDown(0) && !MouseUtils.IsMouseOverUIObject())
            {
                if (PlacedOne != null)
                {
                    SetDirection();
                }
                else
                {
                    PlaceOne();
                }
            }
        }