|
|
@@ -78,14 +78,15 @@ public class GameAssistUI : MonoBehaviour
|
|
|
bool autoSwitch = true;
|
|
|
int myPlayerIndex = GetMyPlayerIndex();
|
|
|
int curPlayerIndex = GetCurPlayerIndex();
|
|
|
- if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
- if (myPlayerIndex == curPlayerIndex) {
|
|
|
- autoSwitch = true;
|
|
|
- } else {
|
|
|
- autoSwitch = false;
|
|
|
- //渲染别人的瞄准镜
|
|
|
- DisplayScaleAim(playerScaleAimValue_OnlinePK > 0, playerScaleAimValue_OnlinePK); }
|
|
|
- }
|
|
|
+ // if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
+ // if (myPlayerIndex == curPlayerIndex) {
|
|
|
+ // autoSwitch = true;
|
|
|
+ // } else {
|
|
|
+ // autoSwitch = false;
|
|
|
+ // //渲染别人的瞄准镜
|
|
|
+ // DisplayScaleAim(playerScaleAimValue_OnlinePK > 0, playerScaleAimValue_OnlinePK);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
if (autoSwitch) {
|
|
|
if (scaleAimOn != playerScaleAimRecords[curPlayerIndex]) {
|
|
|
if (playerScaleAimRecords[curPlayerIndex]) {
|
|
|
@@ -105,12 +106,12 @@ public class GameAssistUI : MonoBehaviour
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- bool IsOnLinePkAndNotMyTime() {
|
|
|
- if (GlobalData.pkMatchType != PKMatchType.OnlinePK) return false;
|
|
|
- int myPlayerIndex = GetMyPlayerIndex();
|
|
|
- int curPlayerIndex = GetCurPlayerIndex();
|
|
|
- return myPlayerIndex != curPlayerIndex;
|
|
|
- }
|
|
|
+ // bool IsOnLinePkAndNotMyTime() {
|
|
|
+ // if (GlobalData.pkMatchType != PKMatchType.OnlinePK) return false;
|
|
|
+ // int myPlayerIndex = GetMyPlayerIndex();
|
|
|
+ // int curPlayerIndex = GetCurPlayerIndex();
|
|
|
+ // return myPlayerIndex != curPlayerIndex;
|
|
|
+ // }
|
|
|
|
|
|
[System.NonSerialized] public int playerScaleAimValue_OnlinePK = 0;
|
|
|
bool[] playerScaleAimRecords = {false, false};
|
|
|
@@ -118,15 +119,17 @@ public class GameAssistUI : MonoBehaviour
|
|
|
|
|
|
int GetMyPlayerIndex() {
|
|
|
if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
- return GlobalData.playerIndexInRoom;
|
|
|
+ // return GlobalData.playerIndexInRoom;
|
|
|
+ return 0;
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
int GetCurPlayerIndex() {
|
|
|
if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
- GameMode gm = GameMgr.ins.gameMode;
|
|
|
- if (GameMgr.gameType == 9) return ((PKGameMode_OnlinePK) gm).gameLogic.currentPlayerIndex;
|
|
|
+ // GameMode gm = GameMgr.ins.gameMode;
|
|
|
+ // if (GameMgr.gameType == 9) return ((PKGameMode_OnlinePK) gm).gameLogic.currentPlayerIndex;
|
|
|
+ return 0;
|
|
|
} else if (GlobalData.pkMatchType == PKMatchType.LocalPK) {
|
|
|
GameMode gm = GameMgr.ins.gameMode;
|
|
|
if (GameMgr.gameType == 2) return ((PKGameMode) gm).currentPlayerIndex;
|