|
|
@@ -162,15 +162,23 @@ public class GameAssistUI : MonoBehaviour
|
|
|
int myPlayerIndex = GetMyPlayerIndex();
|
|
|
playerScaleAimRecords[myPlayerIndex] = isScaleAimOpen;
|
|
|
playerScaleShootRecords[myPlayerIndex] = isScaleShootOpen;
|
|
|
+ if (isLocalPK()) {
|
|
|
+ playerScaleAimRecords[(myPlayerIndex + 1) % 2] = isScaleAimOpen;
|
|
|
+ playerScaleShootRecords[(myPlayerIndex + 1) % 2] = isScaleShootOpen;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#region 本地双人PK,再来时保存记录
|
|
|
private static bool[] playerRecords = null;
|
|
|
+ private bool isLocalPK() {
|
|
|
+ int[] gameTypes = {2, 6, 7, 8};
|
|
|
+ if (System.Array.IndexOf(gameTypes, GameMgr.gameType) > -1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
public void recordPlayerRecordsWhenGameTryAgain() {
|
|
|
- if (GameMgr.gameType != 2) return;
|
|
|
- if (GameMgr.gameType != 6) return;
|
|
|
- if (GameMgr.gameType != 7) return;
|
|
|
- if (GameMgr.gameType != 8) return;
|
|
|
+ if (!isLocalPK()) return;
|
|
|
playerRecords = new bool[] {
|
|
|
playerScaleAimRecords[0], playerScaleAimRecords[1],
|
|
|
playerScaleShootRecords[0], playerScaleShootRecords[1]
|