public void OnPointerClick(PointerEventData data) { if (HoleSelected.HoleSelectedEvent != null) { HoleSelected.HoleSelectedEvent(this, new HoleSelected.HoleSelectedArgs() { index = index }); } }
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 }); } }); }