public void UnSelectPiece() { selected = false; this.transform.GetComponent <Rigidbody>().isKinematic = false; this.transform.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation; //Snap to nearest eligible spot and drop to board. Clear eligible highlihgts SnapToNearestEligible(specificBehavior.eligibleList); hexController.ClearEligibleHighlights(); //If new position is actually new if (currentHex != startHex) // || specificBehavior.active == BoardManager.Active.Dugout) { hexController.OutlineHexTall(currentHex); //Outline the current hex to show which piece moved //boardManager.MovePiece(startHex, currentHex, specificBehavior.color, specificBehavior.type, this.gameObject); boardManager.lastPieceMoved = this.gameObject; phaseManager.EnableButtons(); } //If piece is placed back in the same location as it started else if (currentHex == startHex) { phaseManager.UndoMove(); //Let phase manager know that nothing happened. UndoMove essentially resets the phase manager } }