Esempio n. 1
0
 public override async ETTask OnShow(DirectRectSelectComponent self, Action <Vector3> onSelectedCallback, int[] previewRange)
 {
     if (previewRange == null || previewRange.Length != 2)
     {
         Log.Error("技能预览配置错误!!!");
         return;
     }
     if (self.waiter != null)
     {
         await self.waiter;
     }
     self.distance = previewRange[0];
     self.width    = previewRange[1];
     self.gameObject.SetActive(true);
     self.OnSelectedCallback = onSelectedCallback;
     self.SetArea(self.distance, self.width);
     self.IsShow = true;
 }
Esempio n. 2
0
 public static void SetArea(this DirectRectSelectComponent self, float length, float width)
 {
     self.AreaObj.transform.localScale    = new Vector3(width, length, 10);
     self.AreaObj.transform.localPosition = new Vector3(0, 0, length / 2);
 }