示例#1
0
 public void HandleForDemolition()
 {
     if (Input.GetMouseButtonDown(0))
     {
         //点击到了UI
         if (CheckUtil.IsPointerUI())
         {
             return;
         }
         isBuild           = true;
         timeForDelayTouch = 0.2f;
         CheckAndDemolition();
     }
     if (Input.GetMouseButton(0))
     {
         //点击到了UI
         if (CheckUtil.IsPointerUI())
         {
             return;
         }
         if (timeForDelayTouch > 0)
         {
             return;
         }
         if (!isBuild)
         {
             return;
         }
         CheckAndDemolition();
     }
     if (Input.GetMouseButtonUp(0))
     {
         isBuild = false;
     }
 }