Пример #1
0
 public void ShowRawRect(UControl control, float x, float y, bool ignoreOnce = true)
 {
     if (control == null)
     {
         return;
     }
     if (control.RectTrans == null)
     {
         return;
     }
     if (!control.IsActiveSelf)
     {
         return;
     }
     if (!control.PUIView.IsShow)
     {
         CLog.Error("错误!,控件的父节点UIView没有显示");
         return;
     }
     Show(true);
     UIPointer?.Show(false);
     UICircle?.gameObject.SetActive(false);
     UIRect?.gameObject.SetActive(true);
     UIRect?.SetCenter(RectTrans.InverseTransformPoint(control.RectTrans.position));
     UIRect?.SetRect(x, y);
     IsMaskOnce    = ignoreOnce;
     MaskedControl = control;
     if (ignoreOnce)
     {
         control.UIMgr.AddIgnoreBlockClickOnce(control);
     }
 }
Пример #2
0
 public void ShowPointer(UControl control, float rot = 90, bool maskOnce = true)
 {
     if (control == null)
     {
         return;
     }
     if (control.RectTrans == null)
     {
         return;
     }
     Show(true);
     UIPointer?.Show(true);
     UIRect?.gameObject.SetActive(false);
     UICircle?.gameObject.SetActive(false);
     if (UIPointer)
     {
         UIPointer.SetPosAndRot(RectTrans.InverseTransformPoint(control.RectTrans.position), new Vector3(0, 0, rot));
         IsMaskOnce     = maskOnce;
         PointedControl = control;
         if (maskOnce)
         {
             control.UIMgr.AddIgnoreBlockClickOnce(control);
         }
     }
 }