예제 #1
0
 private void Update()
 {
     if (isOver)
     {
         if (Input.GetMouseButtonDown(0))
         {
             onMouseLeftDown.Invoke(this);
         }
         if (Input.GetMouseButtonDown(1))
         {
             onMouseRightDown.Invoke(this);
         }
         if (Input.GetMouseButtonUp(0))
         {
             onMouseLeftUp.Invoke(this);
         }
         if (Input.GetMouseButtonUp(1))
         {
             onMouseRightUp.Invoke(this);
         }
     }
 }
예제 #2
0
 public void OnPointerExit(PointerEventData eventData)
 {
     isOver = false;
     onMouseExit.Invoke(this);
 }
예제 #3
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     isOver = true;
     onMouseEnter.Invoke(this);
 }