Ver código fonte

算出箭不可达,需要提示用户

lvjincheng 4 anos atrás
pai
commit
4b3cf795c0
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      Assets/BowArrow/Scripts/Game/Arrow.cs

+ 4 - 1
Assets/BowArrow/Scripts/Game/Arrow.cs

@@ -61,7 +61,10 @@ public class Arrow : MonoBehaviour
     {
         CalculateParabolaAngle(absoluteRay.point); 
 
-        if (!hasParabolaAngle) return;
+        if (!hasParabolaAngle) {
+            if (AimLoadChecker.ins) AimLoadChecker.ins.ShowOutTip();
+            return;
+        }
 
         float baseAngleX = this.transform.eulerAngles.x;
         if (baseAngleX > 180) baseAngleX = baseAngleX - 360;