private void OnMouseDown() { Debug.Log(canShoot); if (!canShoot) { firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition); if (isSelected == true) { Deselect(); } else { if (previousSelected == null) { Select(); } else { previousSelected.Deselect(); Select(); } } } if (canShoot) { isMatched = true; } }
private void OnMouseDown() { firstTouch = Camera.main.ScreenToWorldPoint(Input.mousePosition); if (isSelected == true) { Deselect(); } else { if (previousSelected == null) { Select(); } else { previousSelected.Deselect(); Select(); } } }