浏览代码

游戏规则调整

lvjincheng 4 年之前
父节点
当前提交
9e75f7b494
共有 2 个文件被更改,包括 13 次插入15 次删除
  1. 0 6
      Assets/BowArrow/Scripts/Game/ArmBow.cs
  2. 13 9
      Assets/BowArrow/Scripts/Manager/GameMgr.cs

+ 0 - 6
Assets/BowArrow/Scripts/Game/ArmBow.cs

@@ -142,12 +142,6 @@ public class ArmBow : MonoBehaviour
                         int best_rotation_index = i - single_check_count + 1 - this.shootBackTime;
                         if (best_rotation_index < 0) best_rotation_index = 0;
                         best_rotation = recordRotations[best_rotation_index];
-                        //显示射出角度
-                        Quaternion first_rotation = recordRotations[i - single_check_count + 1];
-                        ShootCheck.ins.shootAngleText.text = 
-                            "最佳角度:" + first_rotation.eulerAngles + "\n" +
-                            "延迟角度:" + best_rotation.eulerAngles + "\n" +
-                            "角度偏差:" + Quaternion.Angle(first_rotation, best_rotation);
                     }
                 }
             }

+ 13 - 9
Assets/BowArrow/Scripts/Manager/GameMgr.cs

@@ -344,22 +344,26 @@ public class PKGameMode : GameMode {
                     totalScores[1] += 1;
                 } else if (currentScores[0] > currentScores[1]) {
                     totalScores[0] += 2;
+                    totalScores[1] += 1;
                 } else if (currentScores[0] < currentScores[1]) {
+                    totalScores[0] += 1;
                     totalScores[1] += 2;
                 }
                 //根据总比分判断游戏是否结束
-                if (totalScores[0] == totalScores[1] && round == maxRound) {
-                    if (round == 5) {
-                        maxShootCount = 1;
-                        maxRound = 6;
-                    } else {
-                        gameEnd = true;    
-                        gameRes = new string[]{"平局", "平局"};
+                if (totalScores[0] == totalScores[1]) {
+                    if (round == maxRound) {
+                        if (round == 5) {
+                            maxShootCount = 1;
+                            maxRound = 6;
+                        } else {
+                            gameEnd = true;    
+                            gameRes = new string[]{"平局", "平局"};
+                        }
                     }
-                } else if (totalScores[0] >= 6) {
+                } else if (totalScores[0] >= 6 && totalScores[0] > totalScores[1]) {
                     gameEnd = true;
                     gameRes = new string[]{"胜利", "失败"};
-                } else if (totalScores[1] >= 6) {
+                } else if (totalScores[1] >= 6 && totalScores[1] > totalScores[0]) {
                     gameEnd = true;
                     gameRes = new string[]{"失败", "胜利"};
                 }