Explorar o código

再来一次,继承上一轮的配置

lvjincheng %!s(int64=4) %!d(string=hai) anos
pai
achega
f1523b00f2
Modificáronse 1 ficheiros con 13 adicións e 13 borrados
  1. 13 13
      Assets/BowArrow/Scripts/Game/GameAssistUI.cs

+ 13 - 13
Assets/BowArrow/Scripts/Game/GameAssistUI.cs

@@ -169,7 +169,7 @@ public class GameAssistUI : MonoBehaviour
     }
 
     #region 本地双人PK,再来时保存记录
-        // private static bool[] playerRecords = null; 
+        private static bool[] playerRecords = null; 
         private bool isLocalPK() {
             int[] gameTypes = {2, 6, 7, 8};
             if (System.Array.IndexOf(gameTypes, GameMgr.gameType) > -1) {
@@ -178,20 +178,20 @@ public class GameAssistUI : MonoBehaviour
             return false;
         }
         public void recordPlayerRecordsWhenGameTryAgain() {
-            // if (!isLocalPK()) return;
-            // playerRecords = new bool[] {
-            //     playerScaleAimRecords[0], playerScaleAimRecords[1],  
-            //     playerScaleShootRecords[0], playerScaleShootRecords[1]  
-            // };
+            if (!isLocalPK()) return;
+            playerRecords = new bool[] {
+                playerScaleAimRecords[0], playerScaleAimRecords[1],  
+                playerScaleShootRecords[0], playerScaleShootRecords[1]  
+            };
         }
         private void applyPlayerRecordsWhenGameTryAgain() {
-            // if (playerRecords != null) {
-            //     playerScaleAimRecords[0] = playerRecords[0];
-            //     playerScaleAimRecords[1] = playerRecords[1];
-            //     playerScaleShootRecords[0] = playerRecords[2];
-            //     playerScaleShootRecords[1] = playerRecords[3];
-            //     playerRecords = null;
-            // }
+            if (playerRecords != null) {
+                playerScaleAimRecords[0] = playerRecords[0];
+                playerScaleAimRecords[1] = playerRecords[1];
+                playerScaleShootRecords[0] = playerRecords[2];
+                playerScaleShootRecords[1] = playerRecords[3];
+                playerRecords = null;
+            }
         }
     #endregion