public void OnPointerUp(PointerEventData eventData) { if (!isPlayerInteractable) { return; } ManagerDataPlayer.SetButton(nameButton, false); m_OnClickUp?.Invoke(); i.color = colorDefault; }
public void OnPointerDown(PointerEventData eventData) { if (!isPlayerInteractable) { return; } ManagerDataPlayer.SetButton(nameButton, true); m_OnClick?.Invoke(); if (colorDefault == Color.white) { colorDefault = GetComponent <Image>().color; } if (i == null) { i = GetComponent <Image>(); } i.color = colorPress; }