Exemple #1
0
 public void OnPointerUp(PointerEventData eventData)
 {
     if (!isPlayerInteractable)
     {
         return;
     }
     ManagerDataPlayer.SetButton(nameButton, false);
     m_OnClickUp?.Invoke();
     i.color = colorDefault;
 }
Exemple #2
0
 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;
 }