コード例 #1
0
 public void OnPointerClick(PointerEventData data)
 {
     if (HoleSelected.HoleSelectedEvent != null)
     {
         HoleSelected.HoleSelectedEvent(this, new HoleSelected.HoleSelectedArgs()
         {
             index = index
         });
     }
 }
コード例 #2
0
    public void UpdateFields(int index, System.Numerics.Vector2 coords)
    {
        tHoleIndex.text = "(" + index + ")";
        this.index      = index;
        tCoords.text    = "X=" + coords.X + "\nY=" + coords.Y;

        GetComponent <Button>().onClick.AddListener(delegate
        {
            if (HoleSelected.HoleSelectedEvent != null)
            {
                HoleSelected.HoleSelectedEvent(this, new HoleSelected.HoleSelectedArgs()
                {
                    index = index
                });
            }
        });
    }