Beispiel #1
0
 public void OnMouseDown()
 {
     if (localPiece == null)
     {
         OnClickTile?.Invoke(getName());
     }
 }
Beispiel #2
0
    public void OnMouseDown()
    {
        if (!IsClickable)
        {
            return;
        }

        if (localPiece == null)
        {
            OnClickTile?.Invoke(getName());
        }
    }
Beispiel #3
0
        void OnPointerClick(PointerEventData eventData)
        {
            var screenPosition = eventData.position;
            var cell           = ConvertPixelToCell(screenPosition);

            switch (eventData.button)
            {
            case PointerEventData.InputButton.Left:
                OnClickTile.Invoke(cell);
                break;

            case PointerEventData.InputButton.Right:
                OnRightClickTile.Invoke(cell, screenPosition);
                break;
            }
        }
Beispiel #4
0
 public static void ClickTile(ClientTile tile)
 {
     OnClickTile?.Invoke(tile);
 }