|
@@ -6,6 +6,7 @@ using UnityEngine.UI;
|
|
|
public class HunterGameView_LocalPK : MonoBehaviour
|
|
public class HunterGameView_LocalPK : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
int[] hitScores = {0, 0};
|
|
int[] hitScores = {0, 0};
|
|
|
|
|
+ bool[] dieList = {false, false};
|
|
|
int curPlayerIndex = -1;
|
|
int curPlayerIndex = -1;
|
|
|
ChallengeGameModeLocalPK gameModeLocalPK;
|
|
ChallengeGameModeLocalPK gameModeLocalPK;
|
|
|
HunterGamePlayerScoreCounter scoreCounter;
|
|
HunterGamePlayerScoreCounter scoreCounter;
|
|
@@ -48,6 +49,16 @@ public class HunterGameView_LocalPK : MonoBehaviour
|
|
|
RenderScore(i, scoreCounter.hitScores[i]);
|
|
RenderScore(i, scoreCounter.hitScores[i]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //渲染死亡
|
|
|
|
|
+ if (ChallengeGameMode.IsChallengeWolf()) {
|
|
|
|
|
+ if (GlobalData.pkMatchType == PKMatchType.LocalPK) {
|
|
|
|
|
+ ShowPlayerDie(((WolfHuntGameMode_LocalPK)gameModeLocalPK).playerDieList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //游戏结束
|
|
|
if (GameMgr.ins.gameOver) {
|
|
if (GameMgr.ins.gameOver) {
|
|
|
this.transform.Find("CurrentPlayer").gameObject.SetActive(false);
|
|
this.transform.Find("CurrentPlayer").gameObject.SetActive(false);
|
|
|
}
|
|
}
|
|
@@ -74,8 +85,13 @@ public class HunterGameView_LocalPK : MonoBehaviour
|
|
|
this.transform.Find("ScoreBox/Item" + posNum + "/Score").GetComponent<Text>().text = "得分: " + score.ToString();
|
|
this.transform.Find("ScoreBox/Item" + posNum + "/Score").GetComponent<Text>().text = "得分: " + score.ToString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void ShowPlayerDie(int playerIndex) {
|
|
|
|
|
- this.transform.Find("ScoreBox/Item" + playerIndex + "/IconDie").gameObject.SetActive(true);
|
|
|
|
|
- this.transform.Find("ScoreBox/Item" + playerIndex + "/MaskDie").gameObject.SetActive(true);
|
|
|
|
|
|
|
+ public void ShowPlayerDie(bool[] playerDieList) {
|
|
|
|
|
+ for (int i = 0; i < playerDieList.Length; i++) {
|
|
|
|
|
+ if (playerDieList[i] && !dieList[i]) {
|
|
|
|
|
+ dieList[i] = true;
|
|
|
|
|
+ this.transform.Find("ScoreBox/Item" + i + "/IconDie").gameObject.SetActive(true);
|
|
|
|
|
+ this.transform.Find("ScoreBox/Item" + i + "/MaskDie").gameObject.SetActive(true);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|