Esempio n. 1
0
    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);
                }
            }
        }
    }
Esempio n. 2
0
 public static bool GetMouseButtonDown(int btn) => m_inputModule.GetMouseButtonDown(btn);