Browse Source

修复双人PK5平追加比局时的分数显示异常

lvjincheng 4 years ago
parent
commit
96c28df900

+ 1 - 1
Assets/BowArrow/Scripts/Game/ArmBow.cs

@@ -158,7 +158,7 @@ public class ArmBow : MonoBehaviour
         // Arrow.speed = BaseSpeedSlider.ins.getValue();
         // Arrow.speed = Mathf.Pow(ShootCheck.ins.shootSpeed, ShootCheck.ins.shootSpeed < 13 ? 2f: (ShootCheck.ins.shootSpeed < 15 ? 2.5f : 3.0f));
 
-        if (ShootCheck.ins) {
+        if (ShootCheck.ins && !GameMgr.debugInEditor) {
             Arrow.speed = ShootCheck.ins.shootSpeed / 16 * 80; 
         }   
 

+ 1 - 8
Assets/BowArrow/Scripts/Game/BowCamera.cs

@@ -10,20 +10,13 @@ public class BowCamera : MonoBehaviour
     public Camera cameraComp;
     // 用于禁止相机旋转外部接口
     public bool banRotate = false;
-    public bool debugInEditor = false;
-
-    void Start() {
-        if (this.debugInEditor) {
-            // Cursor.lockState = CursorLockMode.Locked;
-        }
-    }
 
     void Update()
     {
         if (GameMgr.ins.gameOver || banRotate) {
            return;
         }
-        if (debugInEditor) {
+        if (GameMgr.debugInEditor) {
             this.eualrAngles.x = Mathf.Clamp(this.eualrAngles.x - this.mouseSensitivity * Input.GetAxis("Mouse Y"), -36, 36);
             this.eualrAngles.y = Mathf.Clamp(this.eualrAngles.y + this.mouseSensitivity * Input.GetAxis("Mouse X"), -20, 20);   
             this.transform.eulerAngles = this.eualrAngles; 

+ 1 - 0
Assets/BowArrow/Scripts/Manager/GameMgr.cs

@@ -6,6 +6,7 @@ using UnityEngine.UI;
 
 public class GameMgr : MonoBehaviour
 {
+    public static bool debugInEditor = false;
     public static int gameType = 0;
     public GameMode gameMode;
     public bool gameOver = false;

+ 1 - 1
Assets/BowArrow/Scripts/View/PKGameView.cs

@@ -9,7 +9,7 @@ public class PKGameView : MonoBehaviour
     [SerializeField] Text[] scoreTexts;
     PKGameMode pKGameMode;
     int currentPlayerID;
-    string[] numCNs = {"零", "一", "二", "三", "四", "五"};
+    string[] numCNs = {"零", "一", "二", "三", "四", "五", "六"};
 
     public static PKGameView ins;