public void OnPointerDown(PointerEventData eventData) { Debug.Log("HandlePointerDown"); vertGettingSelected = true; // this is a valid double tap => select the clicked vertex if ((Time.time - lastTap) < tapTime) { // this handle isn't selected yet, add it to the selection if (!VertHandler.selectedHandles.Any(x => x == this)) { VertHandler.SelectHandle(this); GetComponent <Image>().color = selectedColor; print("selected this handle at " + transform.position + " there are " + VertHandler.selectedHandles.Count + " elements in the selection"); } // this handle is already selected, deselect it else { VertHandler.DeselectHandle(this); GetComponent <Image>().color = unselectedColor; //print("selected this handle at " + transform.position + " there are " + VertHandler.selectedHandles.Count + " elements in the selection"); } } else if (!VertHandler.selectedHandles.Any(x => x == this)) { VertHandler.quickDragHandle = this; } else { VertHandler.quickDragHandle = null; } lastTap = Time.time; StartCoroutine(cDelayedVertexSelectDisable()); // StartCoroutine(cDragDisableDelayed()); }
private void Awake() { if (_instance == null) { _instance = this; } else { Destroy(this); } selectedHandles = new List <Handle>(); // destroy leftover handles DestroyHandles(); showHandles = true; Main.onSceneChange.AddListener(SceneChanged); }