// Whenever a piece is being clicked/tapped private void OnMouseDown() { if (GameLogic.S.ValidPiecesToSelect(gameObject) && !locked) { //print("valid piece to move"); followMouse = true; offset = transform.position - Camera.main.ScreenToWorldPoint(Input.mousePosition); offset.z = 0.0f; startTime = Time.time; drag.StartLerpTime(); positionSet = false; } }
private void OnMouseDown() { followMouse = true; drag.StartLerpTime(); offset = transform.position - Camera.main.ScreenToWorldPoint(Input.mousePosition); offset.z = 0.0f; }