private void Update() { UpdateSelection(); DrawChessBoard(); if (InputAction.GetMouseButtonDown(0)) //If left click { if (selectionX >= 0 && selectionZ >= 0) //If clicking on board { if (selectedPiece == null) //If clicking on a piece { BoardHighlights.Instance.HideHighlights(); SelectPiece(selectionX, selectionZ); } else { TakeTurn(selectionX, selectionZ); } } } }
public static bool GetMouseButtonDown(int btn) => m_inputModule.GetMouseButtonDown(btn);