lvjincheng %!s(int64=3) %!d(string=hai) anos
pai
achega
d2c0757ae3

+ 4 - 4
Assets/BowArrow/Scripts/Manager/GameMode/PKGameMode_OnlinePK.cs

@@ -222,7 +222,7 @@ public class PKGameMode_OnlinePK : GameMode {
         public string[] gameRes = {"平局", "平局"};
         public string[] gameRes = {"平局", "平局"};
         public bool gameEnd = false;
         public bool gameEnd = false;
         //玩家出场顺序
         //玩家出场顺序
-        public Queue<int> appearPlayerIndexes = new Queue<int>();
+        public List<int> appearPlayerIndexes = new List<int>(); //这里不用Queue,是因为IL2CPP环境下json反序列化失败
         public int[] sequencePlayerIndexes = new int[]{0, 1};
         public int[] sequencePlayerIndexes = new int[]{0, 1};
         public int nextPlayerExcuteID = 0;
         public int nextPlayerExcuteID = 0;
         public void InitAppearPlayerIndexes()
         public void InitAppearPlayerIndexes()
@@ -239,12 +239,12 @@ public class PKGameMode_OnlinePK : GameMode {
                 }
                 }
             }
             }
             for (int i = 0; i < maxShootCount; i++) {
             for (int i = 0; i < maxShootCount; i++) {
-                appearPlayerIndexes.Enqueue(sequencePlayerIndexes[0]);
-                appearPlayerIndexes.Enqueue(sequencePlayerIndexes[1]);
+                appearPlayerIndexes.Add(sequencePlayerIndexes[0]);
+                appearPlayerIndexes.Add(sequencePlayerIndexes[1]);
             }
             }
         }
         }
         public void SetCurrentPlayerIndexToNext() {
         public void SetCurrentPlayerIndexToNext() {
-            currentPlayerIndex = appearPlayerIndexes.Dequeue();
+            currentPlayerIndex = appearPlayerIndexes[0]; appearPlayerIndexes.RemoveAt(0);
             nextPlayerExcuteID++;
             nextPlayerExcuteID++;
         }
         }
         public void Update(PKGameMode_OnlinePK gm) {
         public void Update(PKGameMode_OnlinePK gm) {