using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using AX.MessageSystem; [RequireComponent(typeof(Image))] public class DragVertice : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler, IEndDragHandler { public PolygonController PolygonController; RaycastHit hit; public Canvas Canvas; private int index; private Image image; private Color originalColor;//ԭʼ��ɫ public static GameObject selectedObj; private GameObject addPanel; private Toggle addToggle; private Button delButton; public bool IsOnDrag; private void Start() { if (!Canvas) Canvas = GameObject.Find("Canvas").GetComponent(); image = GetComponent(); originalColor = image.color; addPanel = transform.parent.parent.Find("VerticeAddPanel").gameObject; addToggle = addPanel.transform.Find("Add").GetComponent(); delButton = addPanel.transform.Find("DelButton").GetComponent