Example #1
0
 public void OnEndDrag(PointerEventData data)
 {
     if (data.pointerId == finger)
     {
         float x = Mathf.Abs(hold.transform.position.x);
         float y = Mathf.Abs(hold.transform.position.y);
         //wallの外にドロップした場合
         if (x > Observer.WALL_W / 2 || y > Observer.WALL_H / 2)
         {
             Destroy(hold);
         }
         else
         {
             holdScript.Focus_P1();
             holdScript.SetSLN("Default");
         }
         finger = Observer.FINGER_NONE;
     }
 }