lvjincheng 4 жил өмнө
parent
commit
ccdaedbc5d

+ 3 - 3
Assets/BowArrow/Scenes/Game.unity

@@ -20713,7 +20713,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1515377854
 RectTransform:
   m_ObjectHideFlags: 0
@@ -21961,7 +21961,7 @@ RectTransform:
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 20, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
@@ -29319,7 +29319,7 @@ RectTransform:
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 10, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}

+ 3 - 2
Assets/BowArrow/Scripts/Game/ArmBow.cs

@@ -20,6 +20,7 @@ public class ArmBow : MonoBehaviour
     
     //射箭姿态记录索引倒退数,根据射击难度制造误差
     [NonSerialized] public int shootBackTime = 0;
+    [NonSerialized] public float shootOffsetAngleScale = 0;
 
     bool canShoot = false;
     bool pulling = false;
@@ -46,8 +47,8 @@ public class ArmBow : MonoBehaviour
         ins = this;
         //initdata
         int currentShootLevel = LoginMgr.myUserInfo.shootLevel;
-        int[] shootBackTimes = {0, 2, 5};
-        shootBackTime = shootBackTimes[currentShootLevel];
+        shootBackTime = new int[]{0, 2, 5}[currentShootLevel];
+        shootOffsetAngleScale = new float[]{0, 7.5f, 10f}[currentShootLevel];
     }
 
     void Start()

+ 3 - 0
Assets/BowArrow/Scripts/Game/Arrow.cs

@@ -94,6 +94,9 @@ public class Arrow : MonoBehaviour
         if (DebugArrowOffsetAngle.ins) {
             offsetAngleX *= DebugArrowOffsetAngle.ins.GetOffsetScaleValue();
             offsetAngleY *= DebugArrowOffsetAngle.ins.GetOffsetScaleValue();
+        } else {
+            offsetAngleX *= this.armBow.shootOffsetAngleScale;
+            offsetAngleY *= this.armBow.shootOffsetAngleScale;
         }
 
         if (absoluteRay.transform) {