|
|
@@ -218,7 +218,7 @@ public class ArmBow : MonoBehaviour
|
|
|
arrowComp.absoluteRay = absoluteRay;
|
|
|
arrowComp.offsetAngle = GameDebug.ins ?
|
|
|
GameDebug.ins.GetOffsetAngle() :
|
|
|
- FormatAngle(Quaternion.Angle(absolute_rotation, final_rotation));
|
|
|
+ Quaternion.Angle(absolute_rotation, final_rotation);
|
|
|
arrowComp.finalAngleAfterOffset = final_rotation.eulerAngles;
|
|
|
|
|
|
if (ShootCheck.ins && !GameMgr.debugInEditor && !BowCamera.isTouchMode)
|
|
|
@@ -236,15 +236,6 @@ public class ArmBow : MonoBehaviour
|
|
|
if (AimHandler.ins) AimHandler.ins.BanControlObjRotate(true);
|
|
|
}
|
|
|
|
|
|
- //因为Unity引擎的规则,向上时359~270度,向下是0~90度
|
|
|
- //为了方便数学运算,换算成 向上时0~90度,向下是0~-90度
|
|
|
- float FormatAngle(float value)
|
|
|
- {
|
|
|
- if (value > 180) value = 360 - value;
|
|
|
- else value = -value;
|
|
|
- return value;
|
|
|
- }
|
|
|
-
|
|
|
public void OnEnable()
|
|
|
{
|
|
|
AudioMgr.GetAudioSource(this.gameObject).clip = null;
|